Apache2::Request (libapreq2-2.13) on centos 5.5 - linux

I'm having a torrid time installing Apache2::Request on Centos 5.5. My apache is the standard one that came with centos.
I'm installing from libapreq2-2.13 and a lot of dependencies didn't already exist. I so far had to do:
yum install httpd-devel # for apxs
I then did:
perl Makefile.PL --with-apache2-apxs=/usr/sbin/apxs
make
The make step then told me i needed: ExtUtils-XSBuilder and Parse-RecDescent, which i duly installed.
running make again gave the compiler error:
/home/xx/installers/libapreq2-2.13/glue/perl/xsbuilder/apreq_xs_postperl.h:22:34: error: modperl_perl_unembed.h: No such file or directory
/home/xx/installers/libapreq2-2.13/glue/perl/xsbuilder/apreq_xs_postperl.h:25:33: error: modperl_common_util.h: No such file or directory
In file included from Apache2.xs:45:
/home/xx/installers/libapreq2-2.13/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h:1:22: error: mod_perl.h: No such file or directory
Can anyone tell me which package i'm missing?
Is there not a method of installing this common package that "just works" (tm).
Many thanks

It's already packaged for Centos.
$ repoquery -i --whatprovides 'perl(Apache2::Request)'
perl-libapreq2-0:2.09-0.rc2.1.el5.x86_64
$ sudo yum install perl-libapreq2
(Actually, that only works if you're using the EPEL repository)

To install the headers , yum install mod_perl-devel

Related

python3: can't install psycopg2 [duplicate]

I cannot figure this out for the life of me.
When I pip install django-tenant-schemas it tries to install the dependency psycopg2 which requires the Python headers and gcc. I have all this installed and still keep getting this error!
./psycopg/psycopg.h:35:10: fatal error: libpq-fe.h: No such file or directory
So to install libpq-fe-h I need to sudo apt-get install libpq-dev..
..which returns..
libpq-dev is already the newest version (10.10-0ubuntu0.18.04.1).
Then when I sudo find / libpq-fe.h it doesn't seem to be in my OS.
I am lost at this point. If anyone can help I would highly appreciate it.
For some reason, the file is missing on the system.
As you're using apt-get, the system is dpkg based, presumably Debian or it's derivative. You can try the Ubuntu's package search to get which package contains a file with name ending in libpq-fe.h.
I found the package is libpq-dev and file's absolute path is /usr/include/postgresql/libpq-fe.h.
FWIW, on a dpkg based system, you can check which package gives a file if you know the file's absolute path:
% dpkg -S /usr/include/postgresql/libpq-fe.h
libpq-dev: /usr/include/postgresql/libpq-fe.h
Also, unlike find, locate keeps a cache of found files (mlocate.db) that is created everyday via cron; so if the file happens to be removed after the last run, you can run locate libfq-fe.h to get the absolute path to the file without needing to check the Ubuntu package search online.
So the package is libpq-dev. Now, reinstalling it will get everything to the default state i.e. all relevant files will be copied to the right places. As it is only a library package, no user/system level configurations will be overridden (and dpkg will prompt you for action for any package that does that).
To reinstall the package:
sudo apt-get install --reinstall libpq-dev
For me, I realized it was trying to use the deprecated setup.py so I installed wheel (pip install wheel) and that sorted it all out.
Well after installing these libraries
sudo dnf install python-virtualenv openssl-devel gcc libffi-devel libxslt-devel issue was not gone.
I used mlocate to find where libpq-fe.h file is located. On my system (Fedora 32) it was located at /usr/pgsql-10/include/libpq-fe.h
yum install mlocate
sudo updateb
locate libpq-fe.h
After all added this line to ~/.bash_profile
nano ~/.bash_profile
export PATH=/usr/pgsql-10/bin/:$PATH
Works fine, I can easily install psycopg2 without any trouble.
You need to create a LD_LIBRARY_PATH that indicates the path of your library /user/pgsql-11/lib
Source: The 3rd point of build prerequisites at https://www.psycopg.org/docs/install.html#build-prerequisites

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Linux Yum Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

So this error is driving me crazy, I've search the web multiple times, ran a few things and no results. I get the following error when using yum.
[root#texas pycurl-7.19.0]# yum update
Fatal Python error: pycurl: libcurl link-time version is older than compile-timeversion
Aborted
[root#texas pycurl-7.19.0]# rpm -qa | grep pycurl
python-pycurl-7.19.0-8.el6.i686
[root#texas pycurl-7.19.0]# rpm -qa | grep curl
curl-7.19.7-26.el6_2.4.i686
libcurl-7.19.7-26.el6_2.4.i686
python-pycurl-7.19.0-8.el6.i686
[root#texas pycurl-7.19.0]#
[root#texas /]# locate libcurl.so
/usr/lib/libcurl.so
/usr/lib/libcurl.so.4
/usr/lib/libcurl.so.4.1.1
[root#texas /]# locate pycurl
/usr/lib/python2.6/site-packages/pycurl-7.19.0-py2.6.egg-info
/usr/lib/python2.6/site-packages/pycurl.so
/usr/share/doc/python-pycurl-7.19.0
I've recompiled my directadmin build with curl and no change after that either. (I already had directadmin with curl working fine before)
Any help is appreciated.
I have found that VMWare Toolkit caused this issue on CentOS VMs.
vi /etc/ld.so.conf.d/vmware-tools-libraries.conf
and add the following two lines at the top (assuming you're 64-bit):
/lib64
/usr/lib64
Save, and "ldconfig".
I just had the same issue. Someone just played with LD_LIBRARY_PATH.
unset LD_LIBRARY_PATH; yum update
or
LD_LIBRARY_PATH='' yum update
does the trick for me.
I just had the same problem after having added a bunch of libraries to the ldconfig path. (I needed to install the RPostgreSQL in my local R install, and was missing libpq.so and some others; I happened to have a package that had all that --and more-- and simply added the libs of that package via ldconfig; that royally screwed up yum and pycurl etc.)
So, I just selected the minimal set of libs I wanted and added them to some place in /usr/local/lib/rpostgresql-depend, then added that via ldconfig. Now both that RPostgreSQL package in R and yum work.
Your problem might be a variation of this.
My error is very simple.
remove /usr/local/curl/lib/ from /etc/ld.so.conf then it's ok.
Reached here from google. So just for future viewers, if I use yum without root permission, I was getting this error. Using sudo yum fixed it. I am using CentOS 7.9.2009.

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

I am trying to install roccc 2.0. I have installed required packages. Now while installing it, it is giving me this error:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
I searched for gnu/stubs-32.h and came to know, for Linux 64-bit its in glibc-devel and for Linux 32-bit, its in libc6-dev-i386.
I am using Linux 32-bit: i386 GNU/Linux, but couldn't get the lib required to resolve this error.
Can somebody please help me out?
If your Linux distro is Redhat based (Fedora/CentOS/RHEL):
yum install glibc-devel.i686
References
Original post answer solved this problem RHEL x64
Header file gnu/stubs-32.h is under /usr/include/i386-linux-gnu/ but the install script tries to find it in /usr/include/, try this quick fix to complete the installation:
sudo ln -s /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/gnu/stubs-32.h
After installation is finished, you can delete the link.
The package name keeps on changing, just do a
yum list glibc-devel
to find out current package for 32 bit. In my case it only listed 2 packages one for 32 bit and one for 64 bit. I just installed the 32 bit using
yum install glibc-devel.i686
Install 'glibc-devel' package, or whatever it called in your distro. You may also need to install ia32-libs lib32z1-dev lib32bz2-dev (names could be different in your distro).
The script is trying to get stubs-32.h from /usr/include/ where it is not found. To solve this you have to add an "include" path (by default it is /usr/include) like this:
C_INCLUDE_PATH=/usr/include/i386-linux-gnu/
export C_INCLUDE_PATH
OR
export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
You can visit Error "gnu/stubs-32.h: No such file or directory" while compiling Nachos source code for additional reference.
If on a Red Hat distro such as Fedora/CentOS/RHEL you can do the following to find out what package provides a given file:
$ repoquery -qf */stubs-32.h
glibc-devel-0:2.17-260.el7.i686
And then install it:
$ sudo yum install -y glibc-devel-0:2.17-260.el7.i686

libstdc++.so.5: cannot open shared object file - but library is installed and up-to-date

My client had some developer write a small c++ command-line app to run on their Linux servers. On one of the servers (running Fedora 11), when I execute the app I get the following error:
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Obviously the first thing I did was
yum install libstdc++
But I get
Package libstdc++-4.4.1-2.fc11.x86_64 already installed and latest version
So the library already exists and is up-to-date. Usually to me these errors indicate a missing library. So where should I look next?
rpm hence the repo knows about shared library names and what provides them. So
yum install 'libstdc++.so.5'
wiil install whatever is necessary if the repo has it.
In your case it would fetch compat-libstdc++-33-3.2.3-66.i586.rpm and its 32-bit deps if you don't have them already because the binary you are trying to run is apparently 32-bit
libstdc++-4.4.1-2.fc11.x86_64 installs libstdc++.so.6. You need the compat-libstdc++-33-3.2.3-66.x86_64 package to get libstdc++.so.5. (Do not symlink! libstdc++.so.5 and libstdc++.so.6 are incompatible.)
yum install compat-libstdc++-33 solved this for me.
libstdc++.so.5 is a very old version of the standard c++ library.
Do a yum search libstdc++ , you'll have to install one of the compat-libstdc++ packages.
As stated by caf and aaron, running yum install compat-libstdc++-33 libstdc++.so.5 -y worked for me when I got a similar error.
The only catch I ran into was, I didn't have the correct repo checked out so I had to run yum-config-manager --enable rhel-7-server-optional-rpms to access the files. If you are using something other than RedHat 7 you will need to search for the correct repo.
You could always check if you have the correct repo by running yum provides libstdc++.so.5 first.
worked for me too on RedHat 7 : error was :
error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS32
The solution was :
yum install compat-libstdc++-33 libstdc++.so.5 -y
Have you checked that the package does install libstdc++.so.5 and not some other version? That's your most likely problem.

Resources