我正在尝试在我的服务器上安装一个运行在Cabal中的Haskell服务器。当我正常配置服务器来运行它时,我遵循这些我们已经改进的说明 - 它们每次都在空白的机架空间云服务器上100%工作。
yum update
yum install git
yum install vim
yum install ghc-zlib-devel.x86_64
wget http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-centos65.tar.xz
wget http://www.haskell.org/cabal/release/cabal-install-1.20.0.1/cabal-x86_64-unknown-linux.tar.gz
tar xvfJ ghc-7.8.2-x86_64-unknown-linux-centos65.tar.xz
tar -zxvf cabal-x86_64-unknown-linux.tar.gz
cd ghc-7.8.2
./configure
yum install gcc
./configure
make install
cd ../
git clone https://github.com/samheather/DSA-WAW.git
cd DSA-WAW/server
cp -r ../../cabal cabal
./cabal update
./cabal install cabal-install
./cabal sandbox init
cabal install
然后我可以直接导航到输出文件夹并运行服务器。
但是,在我的iWeb专用服务器上,这不起作用。大多数步骤都很好,直到它达到'./cabal install cabal-install',它会引发以下错误:
./cabal install cabal-install
Resolving dependencies...
Configuring network-2.5.0.0...
Configuring zlib-0.5.4.1...
Configuring Cabal-1.20.0.1...
Building zlib-0.5.4.1...
Failed to install zlib-0.5.4.1
Last 10 lines of the build log ( /root/.cabal/logs/zlib-0.5.4.1.log ):
Configuring zlib-0.5.4.1...
Building zlib-0.5.4.1...
Preprocessing library zlib-0.5.4.1...
hsc2hs: dist/build/Codec/Compression/Zlib/Stream_hsc_make: runProcess: runInteractiveProcess: exec: permission denied (Permission denied)
Failed to install network-2.5.0.0
Last 10 lines of the build log ( /root/.cabal/logs/network-2.5.0.0.log ):
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.0-4813/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
Failed to install Cabal-1.20.0.1
Last 10 lines of the build log ( /root/.cabal/logs/Cabal-1.20.0.1.log ):
[68 of 76] Compiling Distribution.Simple.Build ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/Build.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/Build.o )
[69 of 76] Compiling Distribution.Simple.Haddock ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/Haddock.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/Haddock.o )
[70 of 76] Compiling Distribution.Simple.SrcDist ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/SrcDist.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/SrcDist.o )
[71 of 76] Compiling Distribution.Simple.UserHooks ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/UserHooks.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/UserHooks.o )
[72 of 76] Compiling Distribution.Simple.Bench ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/Bench.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/Bench.o )
[73 of 76] Compiling Distribution.Simple.Test.ExeV10 ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/Test/ExeV10.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/Test/ExeV10.o )
[74 of 76] Compiling Distribution.Simple.Test ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple/Test.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple/Test.o )
[75 of 76] Compiling Distribution.Simple ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/Distribution/Simple.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Distribution/Simple.o )
[76 of 76] Compiling Main ( /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/setup.hs, /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/Main.o )
Linking /tmp/Cabal-1.20.0.1-4813/Cabal-1.20.0.1/dist/setup/setup ...
cabal: Error: some packages failed to install:
Cabal-1.20.0.1 failed during the configure step. The exception was:
ExitFailure 127
HTTP-4000.2.17 depends on network-2.5.0.0 which failed to install.
cabal-install-1.20.0.3 depends on Cabal-1.20.0.1 which failed to install.
network-2.5.0.0 failed during the configure step. The exception was:
ExitFailure 1
zlib-0.5.4.1 failed during the building phase. The exception was:
ExitFailure 1
有没有人知道这有什么问题?
谢谢,
萨姆
更新:我应该提一下,因为服务器已经有gcc我们跳过这两步:“yum install gcc; ./configure”
答案 0 :(得分:5)
之前安装zlib1g-dev软件包。
答案 1 :(得分:3)
/tmp
删除粘性位)。相反,我从Github下载了cabal v1.20.2并执行了bootstrap.sh
脚本,请参阅README。
答案 2 :(得分:2)
我刚想出来了 - 我的/ tmp没有exec权限。由于服务器运行WHM / cPanel,我刚刚运行/scripts/securetmp
,同时回答n
。
答案 3 :(得分:1)
我修复了与ghc-pkg recache
类似的错误,这些错误实际上是在失败的构建过程中提到的,也许我重新安装了具有相同版本的Haskell平台。