libtool: error: Failed to create '.libs' - linux

I got this error while installing mpc-1.0.2 under ubuntu 16.04
First, I ran the following command():
sudo ./configure --prefix=/usr --docdir=/usr/share/doc/mpc-1.0.2
It didn't give any error.
Then, I ran the make command, which gave the following error:
make all-recursive
make[1]: Entering directory '/usr/mpc-1.0.2'
Making all in src
make[2]: Entering directory '/usr/mpc-1.0.2/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. > -g -O2 -MT abs.lo -MD -MP -MF .deps/abs.Tpo -c -o abs.lo abs.c
libtool: compile: Failed to create `.libs'
Makefile:448: recipe for target 'abs.lo' failed
make[2]: * [abs.lo] Error 1
make[2]: Leaving directory '/usr/mpc-1.0.2/src'
Makefile:388: recipe for target 'all-recursive' failed
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory '/usr/mpc-1.0.2'
Makefile:298: recipe for target 'all' failed
make: *** [all] Error 2

I had the same, then I tried sudo make and it works.I also ran the ./configure with sudo ./configure
linux make sudo

If your are installing it in a folder with root access then you need to use sudo with it

Related

can't make riscv-gnu-toolchain "make -j$(nproc)" on Arch Linux

I'm building the riscv-gnu-toolchain here on the latest Arch Linux.
https://github.com/riscv-collab/riscv-gnu-toolchain like this:
sudo pacman -Syyu autoconf automake curl python3 libmpc mpfr gmp gawk base-devel bison flex texinfo gperf libtool patchutils bc zlib expat
cd /tmp
git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
cd riscv-gnu-toolchain
mkdir build
cd build
../configure --prefix=${HOME}/riscv64_github
make -j$(nproc)
When compiling during the build of gcc I get this error:
/tmp/riscv-gnu-toolchain/gcc/gcc/fold-const.cc:16842:1: fatal error: error writing to /tmp/ccNNtXpB.s: No space left on device
16842 | }
| ^
compilation terminated.
make[2]: *** [Makefile:1143: fold-const.o] Error 1
make[2]: *** Waiting for unfinished jobs....
rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod
make[2]: Leaving directory '/tmp/riscv-gnu-toolchain/build/build-gcc-newlib-stage1/gcc'
make[1]: *** [Makefile:4607: all-gcc] Error 2
make[1]: Leaving directory '/tmp/riscv-gnu-toolchain/build/build-gcc-newlib-stage1'
make: *** [Makefile:552: stamps/build-gcc-newlib-stage1] Error 2
What should I do?

Facing issue while installing Apache 2.4.53 on RHEL 7.9

I am trying to install 2.4.53 on RHEL Linux 7.9.I am facing the below error when I do sudo make && make install. sudo ./configure works fine which I ran before sudo make && make install.
/bin/sh /opt/idam/httpd-2.4.53/srclib/apr/libtool --mode=install /bin/install -c -m 755 libaprutil-1.la /usr/local/apache2/lib
libtool: install: warning: relinking libaprutil-1.la' (cd /opt/idam/httpd-2.4.53/srclib/apr-util; /bin/sh /opt/idam/httpd-2.4.53/srclib/apr/libtool --silent --mode=relink gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/opt/idam/httpd-2.4.53/srclib/apr-util/include -I/opt/idam/httpd-2.4.53/srclib/apr-util/include/private -I/opt/idam/httpd-2.4.53/srclib/apr/include -version-info 5:4:5 -o libaprutil-1.la -rpath /usr/local/apache2/lib buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo -luuid -lrt -lcrypt -lpthread -ldl -lexpat /opt/idam/httpd-2.4.53/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl ) mv: cannot move 'libaprutil-1.so.0.5.4' to 'libaprutil-1.so.0.5.4U': Permission denied libtool: install: error: relink libaprutil-1.la' with the above command before installing it
make[2]: *** [install] Error 1
make[2]: Leaving directory /opt/idam/httpd-2.4.53/srclib/apr-util' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory /opt/idam/httpd-2.4.53/srclib'
make: *** [install-recursive] Error 1
I tried sudo ./configure --enable-so --enable-ssl --with-mpm=prefork --with-included-apr --with-included-apr-util too but didn't worked.
Also instaling gcc packages on the system didn't worked.

compilation fatal error boost/filesystem

when running make
g++ -pedantic -Wall -W -g pkg-config --cflags --libs liblog4cxx
dbus-c++-1 -DDOUANE_VERSION=\"0.9.0\" -o freedesktop/desktop_file.o
-c freedesktop/desktop_file.cpp In file included from freedesktop/desktop_file.cpp:1:0: freedesktop/desktop_file.h:5:37:
fatal error: boost/filesystem/path.hpp: No such file or directory
compilation terminated. Makefile:36: recipe for target
'freedesktop/desktop_file.o' failed make: ***
[freedesktop/desktop_file.o] Error 1
getting this, Im on a distro with XFCE environment, as I searched the freedesktop/desktop_file.cpp has to do with the XFCE. But the main problem is line
boost/filesystem/path.hpp
the solution given by https://stackoverflow.com/a/25770596/1320686
sudo apt-get install libboost-dev

Unable to run the `make` command

I am trying to run the make command over the NVIDIA CUDA Sample files. I navigated to the directory and typed make. Below is the output.
root#ubuserver3:/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples# make
make[1]: Entering directory `/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleAssert'
"/home/ubuadmin/CUDA"/bin/nvcc -ccbin g++ -I../../common/inc -m32 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -o simpleAssert.o -c simpleAssert.cu
g++: No such file or directory
make[1]: *** [simpleAssert.o] Error 1
make[1]: Leaving directory `/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleAssert'
make: *** [0_Simple/simpleAssert/Makefile.ph_build] Error 2
root#ubuserver3:/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples#
There is an error which I do not understand why.
If you search you'll find many answers for this question. Basically, you don't have a compiler installed on your system.
Since you're running Ubuntu, run sudo apt-get install build-essential to get all the packages needed to compile software.

Snort installation on RHEL 6.2 64 bit

I am installing snort on RHEL 6.2
I am trying to install DAQ.
I am running
make install
and getting below error:
RCE -module -export-dynamic -avoid-version -shared -L/usr/lib -ldnet -o daq_ipq.la -rpath /usr/local/lib/daq daq_ipq_la-daq_ipq.lo -lipq -L/usr/lib -ldnet ../sfbpf/libsfbpf.la )
libtool: relink: gcc -shared .libs/daq_ipq_la-daq_ipq.o -Wl,-rpath -Wl,/usr/local/lib -L/usr/lib -lipq -ldnet -L/usr/local/lib -lsfbpf -Wl,-soname -Wl,daq_ipq.so -o .libs/daq_ipq.so
/usr/bin/ld: /usr/lib/libdnet.a(addr.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libdnet.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
libtool: install: error: relinkdaq_ipq.la' with
the above command before installing it
make[2]: * [install-pkglibLTLIBRARIES] Error 1
make[2]: Leaving directory `/usr/daq-0.6.2/os-daq-modules'
make[1]: * [install-am] Error 2
make[1]: Leaving directory `/usr/daq-0.6.2/os-daq-modules'
make: * [install-recursive] Error 1
Please help
After this, it worked:
$tar zxvf /root/snort-packages/libdnet-1.12.tgz
$cd libdnet-1.12
$ ./configure "CFLAGS=-fPIC -g -O2" --prefix=/usr
$make
$make install
$ yum install libdnet-devel
$ locate libdnet
$ ln -s libdnet.1 libdnet.so.1
$ cp /usr/lib64/libdnet.so.1 /usr/local/lib/libdnet.so.1
Try this:
$tar zxvf /root/snort-packages/libdnet-1.12.tgz
$cd libdnet-1.12
$ ./configure "CFLAGS=-fPIC -g -O2" --prefix=/usr
$make
$make install
$ yum install libdnet-devel
$ locate libdnet
$ ln -s libdnet.1 libdnet.so.1
$ cp /usr/lib64/libdnet.so.1 /usr/local/lib/libdnet.so.1

Resources