Makefile:252: recipe for target 'install' failed - linux

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

Related

Unable to install node via nvm in Cygwin

When I try to use the "nvm install" command, it seems to run fine but at the very end I get the following long error message:
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: Missing input files:
/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/tools\msvs\genfiles\node_etw_provider.rc
/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/tools\msvs\genfiles\node_etw_provider.h
/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/deps/v8/gypfiles/..\src\parsing\preparse-data-format.h
/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/tools\msvs\genfiles\node_perfctr_provider.rc
/usr/bin/python2.7 tools/gyp_node.py -f make
make -C out BUILDTYPE=Release V=1
touch 7943452e36215487f7a1b8edf63ca06ddfd83538.intermediate
LD_LIBRARY_PATH=/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/out/Release/lib.host:/home/Dinghy/.nvm/.cache/src/node-v10.20.1/files/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p tools/msvs/genfiles; "mc src/res/node_etw_provider.man -h tools/msvs/genfiles -r tools/msvs/genfiles"
/bin/sh: mc src/res/node_etw_provider.man -h tools/msvs/genfiles -r tools/msvs/genfiles: No such file or directory
make[1]: *** [node_etw.target.mk:17: 7943452e36215487f7a1b8edf63ca06ddfd83538.intermediate] Error 127
rm 7943452e36215487f7a1b8edf63ca06ddfd83538.intermediate
make: *** [Makefile:99: node] Error 2
nvm: install v10.20.1 failed!
I've also tried installing it manually but haven't had any success that way either. This worked fine on an old install of cygwin I had, so I'm not sure what the problem is on this new install.

./configure: No such file or directory when getting tar.gz file

I'm creating a mac setup shell script and testing out installing Atom. They give instructions on how to Install the source, but installing source tends to take a lot longer than installing binaries.
When I run the sh script, It gets and installs the binaries,
./configure: No such file or directory
From here:
...
x atom-1.12.7/vendor/jasmine-jquery.js
x atom-1.12.7/vendor/jasmine.js
ln: /usr/local/bin/atom: File exists
/Users/danniu/Desktop/Configs/Bash Setup/mac_setup_script/install_atom.sh: line 10: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
Password: _____
I've tried following these instructions, and added ./configure --prefix=~/user/local/bin/atom to configure, but it gives the same issue.
Script:
mkdir -p ~/Desktop/testing123
cd ~/Desktop/testing123
ATOM_VER=1.12.7
echo "Hello $USER. Installing Atom v$ATOM_VER"
wget https://github.com/atom/atom/archive/v$ATOM_VER.tar.gz
tar -zxvf v$ATOM_VER.tar.gz
ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom
./configure
make
sudo make install
apm install atom-beautify
apm install docblockr
apm install pigments
There's a missing step in your script:
cd atom-${ATOM_VER}
right after tar and before configure.
EDIT:
This is based on the assumption that a configure script exists!

Recipe file installing in different directory

I am trying to add one package into my Yocto image. Currently, I can build my image, but when I install the image, the software is being installed in different directory. Are there any ways to reroute the installation directory. Example the library files should be installed in /usr/lib64 but its installed in /usr/lib/.
I have just figure out that when i build the application .ipk file inside dont have the /usr/lib64/ folder. Which means the files is not being added into it. Are there anyways to solve this?
This is my FILES_${PN} code:
FILES_${PN} = "/usr/lib/* \
/usr/lib64/* \
/usr/bin/* \
/etc/* "
Update 1
This is my do_install code:
do_install(){
cp -r ${WORKDIR}/xxx/* ${WORKDIR}/image/
install -d ${D}/usr/lib64
install -m 0644 ${WORKDIR}/xxx/usr/lib64/* ${D}/usr/lib64/
}
All the files listed there are being added into the ipk file except of the /usr/lib64/* files. Are this are the right way of doing it. Please can someone help me on this. Thanks in advance.
You can install libraries manually within a recipe:
do_install() {
install -d ${D}/usr/lib64 # ${D}${libdir} maybe also works
install -m 0644 libexample.a ${D}/usr/lib64
}
D variable explanation from Reference Manual:
The destination directory. The location in the Build Directory where components are installed by the do_install task. This location defaults to:
${WORKDIR}/image
You can find the content of the variables via following command (libdir variable as example):
bitbake -e | grep ^libdir

no rule to make target for simple hello module

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.

Redis - linux / Error when Installing redis on linux: `cc: command not found`

I wish to install redis on my red-hat environment. I do the following:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
I got the next error:
make[3]: *** [net.o] Error 127
make[3]: Leaving directory `/tmp/redis-stable/deps/hiredis'
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/tmp/redis-stable/deps'
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/tmp/redis-stable/src'
make: *** [all] Error 2
How can I fix it?
You are trying to install redis from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc etc. Best way is to install all of them together by installing that group. Run this from terminal
yum grouplist
This will show all groups available and then choose group you want to install or run directly
yum groupinstall 'Development Tools'
This will save you from other problems which might come in future while installing from source.
for those of you who encounter this error
check this github issue
before make run this command
$ cd deps; make hiredis lua jemalloc linenoise
Install build essential first
sudo apt-get install build-essential
then install the dependencies
cd deps
make hiredis lua jemalloc linenoise
If you're not an advanced user maybe it is not a good idea to install REDIS from the source.
Instead you should install a packaged version. For example on Fedora / Centos / RHEL:
sudo yum install redis
Come out from your extracted folder/Dir and remove the extracted redis-x.x.x folder with rm -rf redis-x.x.x
now again extract the redis folder with tar xzf redis-x.x.x.tar.gz
go to redis directory again and run the make or make test again. it works for me.

Resources