Centos
Cabal 錯誤:無法執行 c 編譯的程序
我有一個舊版本的 cabal-install,所以我下載了 cabal-install 1.20,安裝時出錯。
附加說明:ghc 7.8.3
作業系統:CentOS 6.6
錯誤:
Building network-2.4.2.3... ....... ...... ...... usr/bin/ld: cannot find -lHSparsec-3.1.7-ghc7.8.3 collect2: ld returned 1 exit status error during cabal-install bootstrap: building the network package failed.
當我嘗試執行“cabal install network-2.5.0.0”時,出現以下錯誤
root@gains: cabal install network-2.5.0.0 Resolving dependencies... Configuring network-2.5.0.0... configure: WARNING: unrecognized options: --with-compiler, --with-gcc checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details cabal: Error: some packages failed to install: network-2.5.0.0 failed during the configure step. The exception was: ExitFailure 1
錯誤 :
checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details
所以,我執行 command
yum groupinstall "development tools"
,安裝了 c 編譯器工具,可以編譯 c 程序。然後,checking whether we are cross compiling... configure: error: in /tmp/network-2.5.0.023068/network-2.5.0.0':
我試過
mount -o remount,exec,suid /tmp
解決了這個錯誤。它是因為文件系統上的執行權限問題。