Not able to install mod_perl module on the server - apache

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance

It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod

Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain

It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Related

Adding Qt Dependencies to spec file in rpmbuild

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.
The packages that I need are the following:
sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev
I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.
I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.
Supposing you really want to create an rpm; then you need to know this:
BuildRequires
these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application
Requires
these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.
PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

Facing error while installing Apache2 in Ubuntu 14.04 'has no installation candidate'

I don't know what I did but I'm not able to install apache2 in my Ubuntu 14.04.
When I use sudo apt-get install apache2 I face this error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libapache2-mpm-itk:i386 libapache2-mpm-itk
E: Package 'apache2' has no installation candidate
First make sure that your proxy is disabled as that can cause a problem sometimes.
Then run the following.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2
If that doesn't work you can always compile your own apache2. A tutorial for that is located here: https://www.virgohacks.net/install-apache-2-4-mysql-5-6-php-5-5-source-ubuntu-14-04/
Good luck

cmake not working, could not exec qmake

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
What am I doing wrong?
Does the trick:
sudo apt-get install qt4-qmake
You do not need to install half a gigabyte of qt sdk!
I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.
However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):
sudo apt-get install qt-sdk
For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:
sudo apt install qt5-default
You need the qt dependences:
sudo apt-get install qt4-qmake libqt4-dev
as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu
sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
works for me in Ubuntu 18.04
You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.
The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.
Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.

Passenger/Apache missing gcc/zlib-devel on AWS/CENTOS

I am trying to install Passenger for Apache on an AWS instance running CENTOS. When I try to install it, it tells me:
GNU C++ compiler... not found
Zlib development headers... not found
These have both been installed (yum install gcc zlib-devel) and are at the latest version. gcc -v says that it's at 4.6.2.
I have seen similar questions where the accepted answer was to run
mount -o remount,rw,exec,nosuid /tmp
This returns the following:
mount: can't find /tmp in /etc/fstab or /etc/mtab
I have tried changing the permissions on the /tmp directory (it does exist, just doesn't appear to be mounted) with chmod 777 /tmp, but this did not allow the Passenger install to see the two packages.
Could someone please help me with this? I'm not sure what else to do at this point.
I couldn't solve the issue above, but I managed to install anyway by adding EPEL, then installing mod_passenger through yum:
rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install mod_passenger

Having trouble installing mod_WSGI - can't find input file

I'm trying to set up mod_wsgi for use with Django. I have apache2, apache2-dev, python2.6, python2.6-dev all installed, but I'm getting this error when running configure:
checking for apxs2... /usr/bin/apxs2
checking Apache version... 2.2.14
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in
Thanks for the help!
I had the exact same problem. Installing the apache2-dev package solved it.
sudo apt-get install apache2-dev
I don't think the asker needs this answer anymore, so I answered for future readers with similar problems
Install apache2-threaded-dev:
$ sudo apt-get install apache2-threaded-dev
I started writing that you may need to ensure that you have axps installed (you can do this by installing the apache2-dev package). but I notice that configure already found axps. I had a similar problem but configure was bailing on not finding this dependency. Maybe some similar dependency or write permissions.
You are running the mod_WSGI 'configure' script in the mod_WSGI source code directory aren't you? Ie., in the same directory as the Makefile.in file that comes with the source tar ball.
mod_wsgi's configure script uses apxs to find the path to httpd:
apxs -q SBINDIR
apxs -q TARGET
Combine those with a "/" and add "-v", e.g.,
/blah/bin/httpd -v
That should run without an error. If it does not then mod_wsgi's configure script can't figure out the httpd version and you will get a broken symbolic link for Makefile.in.
For me, libpcre.so.0 wasn't in the LD_LIBRARY_PATH. Doing this:
export LD_LIBRARY_PATH=/usr/local/lib
then reconfiguring mod_wsgi and building fixed the problem.