[英]Not able to install mod_perl module on the server
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. 在我的网站上,我遇到一个错误: an error occurred while processing this directive
在移至新服务器之前,它工作正常。 So when I checked I found that mod_perl module is missing. 因此,当我检查时发现mod_perl模块丢失了。 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. 因此,我尝试通过将模块下载到服务器来安装它,然后尝试使用Perl Makefile.pl
运行,但是它要求使用apache src,但我找不到它。 I can see /usr/bin/apache/
folder but no source file inside the folder. 我可以看到/usr/bin/apache/
文件夹,但文件夹内没有源文件。 So I tried to install the module from Cpanel but I got the following error: 所以我尝试从Cpanel安装模块,但是出现以下错误:
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. 最好使用发行版的打包系统来安装mod_perl,尤其是如果apache也从软件包中安装时。
Yum based systems: 基于百胜的系统:
yum install mod_perl
Deb based systems 基于Deb的系统
apt-get install mod_perl
you may need to enable the module using a2enmod 您可能需要使用a2enmod启用模块
Mostly gcc is either corrupted or not present on your system. 通常,gcc已损坏或在您的系统上不存在。 Please try to re/install gcc on your system 请尝试在系统上重新安装gcc
sudo apt-get update
sudo apt-get install build-essential
On Redhat: 在Redhat上:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc
. 安装gcc
似乎有问题。 You're using CloudLinux, so you should use yum
to reinstall gcc
. 您正在使用CloudLinux,因此应使用yum
重新安装gcc
。
$ sudo -i yum install gcc
But you don't need gcc
if you install the pre-build packages. 但是,如果您安装预构建软件包,则不需要gcc
。
$ 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. 无论哪种方式,您都需要掌握系统的软件包安装-为此,您将需要root用户访问权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.