no rule to make target for simple hello module - linux

So I am trying to write a simple hello module no need to say a newbie :)
however while following steps to create a make file - what I saw was I didnot have build folder at uname -r/build so I created one - not sure that itself should be problem as in instead of creating build folder if I am suppose to download some package ?
Also looking online there is solution which says I need to do below steps
prepare-kernel-sources
cd /usr/src/linux - now turns out I dont i have linux folder too
cp -rf include/generated/* include/linux/
make: Entering directory `/lib/modules/2.6.32-5-amd64/build'
make: *** No rule to make target `modules'. Stop.
make: Leaving directory `/lib/modules/2.6.32-5-amd64/build'
I have tried to install following packages - only the highlighted ones goes through rest gives error
**apt-get install linux-headers-$(uname -r)** goes through
apt-get install Linux-headers-generic
apt-get install build-essentials
apt-cache search linux-headers-$(uname -r)
apt-get install kernel-source-$(uname -r)
**apt-get source linux-image-$(uname -r)** goes through
Can someone please help ?

Finally I found the answer - Missing part was establishing system link.
Below steps solved the issue.
apt-get install linux-headers
ln -s /usr/src/linux-headers-2.6.32-5-amd64/ /lib/modules/2.6.32-5-amd64/build

Directory that contains Makefile and source was named with space between. changed space with underscore(_). Worked.

Related

Makefile:252: recipe for target 'install' failed

I'm trying to install pwlib on my asterisk/ubuntu 16.04 Server, but when I try to run make install I get the following error message:
( for dir in /usr/local/lib \
/usr/local/bin \
/usr/local/include/ptlib \
/usr/local/include/ptlib/unix/ptlib \
/usr/local/include/ptclib \
/usr/local/share/pwlib/make ; \
do mkdir -p $dir ; chmod 755 $dir ; \
done )
/usr/bin/install -c -m 444 lib/libpt_linux_x86_64_r.so.1.12.0 /usr/local/lib
/usr/bin/install: cannot stat 'lib/libpt_linux_x86_64_r.so.1.12.0': No such file or directory
Makefile:252: recipe for target 'install' failed
make: *** [install] Error 1
Thank you in advance for your help!
Greetings
Alessio
Aware this is an old post but for anyone with a similar issue:
Sometimes running
make install
will throw this error while
sudo make install
will work
Problem
This does not seem to be a makefile error, like your tags suggest.
Instead, the error lies in install. I'm not sure what the -c option does, since the man page only says (ignored), but with -m you are trying to set permissions to a file. lib/libpt_linux_x86_64_r.so.1.12.0 located in /usr/local/lib. However, this file does not exist in this location, as indicated by the error message No such file or directory.
I guess that you forgot to install some dependencies.
Solutions
If you have a configure script in your downloaded files, use it, maybe this will solve your dependency issues.
If this does not work, try installing your dependencies manually
You could also try alternatives, like the ptlib library, which is also available as package. For ubuntu, it should be libpth20, but I don't use ubuntu so you might have a look around if this is the correct package for you
I had a similar issue.
Makefile:1264: recipe for target 'install' failed
make: *** [install] Error 1
I scrolled through the installation locating the error message and found this:
ModuleNotFoundError: No module named 'zlib'
I googled how to download zlib and after installing zlib I was able to complete the installation
using : sudo make install

How to compile dansguardian

I am trying to download dansguardian on centos 7 but I am not able to do so. Please anybody can help for this.
I have downloaded tar.bz2 file of dansguardian and then performed these step
tar -xjvf taf_file
./configure
make
make: *** No targets specified and no makefile found. Stop.
make install
Trying install all development tools like this:
yum groupinstall 'Development Tools'
then run:
./configure
make
make install

Error installing W3C validator on Ubuntu

I'm installing W3C validator locally on Ubuntu 14.04 with Apache 2.4.7.
I do sudo apt-get install w3c-markup-validator and get this:
ln: failed to create symbolic link ‘/etc/apache2/conf.d/w3c-markup-validator.conf’: No such file or directory
Seems the script is using a different directory structure instead of linking to /etc/apache2/conf-available.
Where do I find this install script to make the change? I'm not familiar with apt-get.
Found it.
Edit /var/lib/dpkg/info/w3c-markup-validator.postinst and comment out lines 41-44.
Then:
sudo ln -s /etc/w3c/httpd.conf /etc/apache2/conf-available/w3c-markup-validator.conf

error in Install previous versions of R on ubuntu

I have R 3.4.1.1 on my computer (Linux).
I want to install R version 2.14.1 since the package Rmosek does not work in newer version.
I have downloaded the R-2.14.2.tar.gz from Cran.
My problem is that I do not understand the INSTALL instructions,
It says to unpack the R sources and go to the top directory and issue the following commands:
./configure
make
I wrote the following in a terminal:
tar -zxvf R-2.14.2.tar.gz
cd Downloads
cd R-2.14.2
./configure
It is run but finally gives the error:
configure: error: --with-x=yes (default) and X11 headers/libs are not available
make
and it gives the error:
make: *** No targets specified and no makefile found. Stop.
The file explains that If my make is not called `make', set the environment variable MAKE to
its name, and use that name throughout these instructions. I really do not know how I should do it since I am new in Linux.
Is there any other instruction with more explanation? I would be very thankful in advance for your help or guidances.
Regards,
Shima.
This is answered in detail in the R installation and administration guide,
http://cran.r-project.org/doc/manuals/R-admin.html#Essential-programs-and-libraries
Unless you do not want to view graphs on-screen (or use a Mac) you
need ‘X11’ installed, including its headers and client libraries. For
recent Fedora distributions it means (at least) RPMs ‘libX11’,
‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. On Debian we recommend the
meta-package ‘xorg-dev’. If you really do not want these you will need
to explicitly configure R without X11, using --with-x=no.
More specifically, for Ubuntu, this means:
sudo apt-get install xorg-dev
and then proceed with compiling and installing R.
If you have to compile R in your system and install you should have libx11-dev package installed in Ubunut.Can you check whether this package is installed or not.
Otherwise you can configure the source with this option as a work around solution only in the case if you are not going to use any GUI functionality in R.
./configure --with-x=no
You need to install these libraries:
sudo apt-get install -y libx11-dev \
xorg-dev \
libcurl4-openssl-dev
Then run:
./configure
make
And then it should work.
Good luck!

How do I build/install protobuf 2.4.1 on CentOs (or any LINUX/UNIX system)?

Ok, so I'm kind of a complete foreigner in the UNIX/LINUX land, but I need to install profbuf 2.4.1.
I was following the instructions by doing
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar xfj protobuf-2.4.1.tar.bz2
pushd protobuf-2.4.1
./configure
make
sudo make install
I could only go as far as ./configure'. WHen I tried runningmake`, I got some error saying "No target specified and no makefile found... Stop"
Does anyone know what I might've done wrong?
Thanks!!!
You probably don't have a g++ compiler in your system or your environment variable doesn't contain the path of it. To install one on linux use the following:
yum install gcc-c++
I had met the same question before, and now I've known the reason. It's lack of corresponding library. If you are using redhat, use root permission to enter the two lines of commands:
# yum install glibc-headers
# yum install gcc-c++
If you are using ubuntu,you can enter this:
# sudo apt-get install build-essential
I've solved my question by that way. Wish you luck!

Resources