2015-08-18 261 views
0

我試圖安裝perl模塊IO :: Tty,IO :: Pty,Net :: SSH2,Net :: SSH :: Perl ....但我沒有安裝一個單一的module.i試圖調試,但無法完全修復它。我發現編譯器存在一些問題。由於下面的命令給出了指示錯誤的輸出。無法在Linux上安裝Perl模塊

which gcc 
output 
/usr/bin/which: no gcc in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) 

whereis gcc 
output 
gcc: 

,當我試圖安裝裝配模塊後檢查錯誤日誌,我得到下面提到的錯誤:

[[email protected] ~]# cat /root/.cpanm/work/1439895011.19383/build.log 
    ERROR: cannot run the configured compiler 'gcc' 
(see conf/compilerok.log). Suggestions: 
1) The compiler 'gcc' is not in your PATH. Add it 
to the PATH and try again. OR 
2) The compiler isn't installed on your system. Install it. OR 
3) You only have a different compiler installed (e.g. 'gcc'). 
Either fix the compiler config in the perl Config.pm 
or install a perl that was built with the right compiler 
(you could build perl yourself with the available compiler). 

請幫我解決這個問題,因爲我無法執行的Perl腳本,對上述模塊有依賴性。

+0

哪個Linux發行版是這樣的?既然你使用'yum',我就假設Fedora或者CentOS/RHEL。 – MC10

回答

4

錯誤消息是不言自明的。

安裝gcc並將其添加到PATH

參見:Installing GCC guide

+0

當我試圖使用命令安裝編譯器:yum安裝gcc獲取錯誤爲:加載的插件:product-id,security,subscription-manager更新基於證書的存儲庫。設置安裝過程沒有可用的包gcc。錯誤:無事可做........請幫忙@Chankey Pathak – user3407271

+0

手動安裝,參考我已經鏈接的指南。在谷歌搜索特定於您的發行版的教程。 –

3

至少一些你提的還有用C實現的模塊需要C編譯器曾經爲安裝您的perl,即gcc。使用系統的軟件包管理器(apt-getyum等)進行安裝。

+0

當我試圖使用命令安裝編譯器:yum安裝gcc獲取錯誤爲:加載的插件:產品ID,安全,訂閱管理器更新基於證書的存儲庫。設置安裝過程沒有可用的包gcc。錯誤:無事可做........請幫忙@ikegami – user3407271

+0

也許你有錯誤的軟件包名稱。如果您需要包管理器方面的幫助,那麼[另一個網站](http://superuser.com/)就是一個單獨的問題。 – ikegami