2016-04-20 43 views
0

在我的網站中出現錯誤:an error occurred while processing this directive 在移動到新服務器之前它工作正常。所以當我檢查我發現mod_perl模塊丟失。所以我試圖通過將模塊下載到服務器來安裝它,然後嘗試使用Perl Makefile.pl運行,但它要求使用apache src,但我無法找到它。我可以看到/usr/bin/apache/文件夾,但文件夾內沒有源文件。 所以我試圖安裝從交友的模塊,但我得到了以下錯誤:無法在服務器上安裝mod_perl模塊

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. 

請讓我知道如何安裝它,因爲我已經試過大多數情況下搜索網。

在此先感謝

回答

1

gcc大多數是損壞或不存在您的系統上。請嘗試重新/系統

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

上安裝GCC在Redhat:

yum update 
yum install devtoolset-2-toolchain 
+0

我不知道該服務器,無論其紅帽別的但是當我試圖代碼,並得到了錯誤:$ sudo易於得到更新 -bash:命令:命令未找到 $百勝更新 -bash: yum:沒有找到命令 – Jitesh

+0

好的,你能否請你的系統發佈以下命令的結果: uname -a –

2

這也可能是最好使用你的發行版的包裝系統安裝mod_perl的,特別是,如果Apache從軟件包安裝過。

基於百勝系統:

yum install mod_perl 

基於德布系統

apt-get install mod_perl 

您可能需要使用a2enmod

+0

我試過代碼時出現錯誤:$ apt-get install mod_perl -bash:apt-get :命令未找到 $ yum install mod_perl -bash:yum:command not found – Jitesh

+0

嗯,那麼服務器使用其他一些打包系統,或者那些工具已被刪除。有什麼方法可以找出哪些發行版被使用?你可以問你的服務器管理員/託管公司嗎? –

+0

CLOUDLINUX 6.7使用x86_64標準 – Jitesh

1

好像與你的gcc安裝問題,使模塊。您正在使用CloudLinux,因此您應該使用yum重新安裝gcc

$ sudo -i yum install gcc 

但是,如果你安裝預構建軟件包,你不需要gcc

$ sudo -i yum install mod_perl 

無論採用哪種方式,您都需要掌握系統的軟件包安裝過程 - 爲此您需要root訪問權限。