无法在服务器上安装mod_perl模块

时间:2016-04-20 04:36:10

标签: apache perl mod-perl

在我的网站中收到错误:an error occurred while processing this directive 在移动到新服务器之前它工作正常。因此,当我检查时,我发现mod_perl模块丢失了。所以我尝试通过将模块下载到服务器来安装它,然后尝试使用Perl Makefile.pl运行但是它要求apache src并且我无法找到它。我可以看到/usr/bin/apache/文件夹,但文件夹中没有源文件。 所以我尝试从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.

请让我知道如何安装它,因为我已经尝试了搜索网络的大部分案例。

提前致谢

3 个答案:

答案 0 :(得分:2)

最好使用您的发行版打包系统来安装mod_perl,尤其是如果从包中安装了apache的话。

以百胜为基础的系统:

yum install mod_perl

基于Deb的系统

apt-get install mod_perl

您可能需要使用a2enmod启用模块

答案 1 :(得分:1)

大多数情况下,gcc已损坏或系统上不存在。请尝试在您的系统上重新安装gcc

sudo apt-get update
sudo apt-get install build-essential

关于Redhat:

yum update
yum install devtoolset-2-toolchain

答案 2 :(得分:1)

安装gcc似乎有问题。您正在使用CloudLinux,因此您应该使用yum重新安装gcc

$ sudo -i yum install gcc

但如果您安装预构建软件包,则不需要gcc

$ sudo -i yum install mod_perl

无论哪种方式,您都需要掌握系统的软件包安装 - 为此您需要root权限。