2014-06-27 6 views
4

내 서버에서 Cabal에서 실행되는 Haskell 서버를 설치하려고합니다. 이를 실행하기 위해 서버를 정상적으로 구성 할 때, 우리는 정제 된 지침을 따릅니다. 빈 랙 공간 클라우드 서버에서 매번 100 % 작동합니다.CentOS 서버에 Cabal (Haskell)을 설치하고 사용할 수 없습니다. - 구축 단계에서 zlib-0.5.4.1이 실패했습니다.

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'할 때까지 단계의 첫 번째 대부분은 괜찮 :

./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는 우리가이 두 단계를 건너 뛸 이후 내가 언급해야한다 "냠 GCC를 설치, ./configure를"

+1

'hsc2hs'를 수동으로 실행할 수 있습니까? –

+0

hsc2hs 란 무엇입니까? 명령 줄 유틸리티로 실행되지 않습니다. –

+1

일반적으로'ghc'와 같은 위치에 있어야합니다. –

답변

2

난 그냥 생각 이 out - my/tmp에는 exec 권한이 없습니다. 서버가 WHM/cPanel을 실행하기 때문에, 나는 /scripts/securetmp을 실행하여 n을 양쪽에 응답했습니다.

+1

또는'mkdir -p $ HOME/tmp && TMPDIR = $ HOME/tmp ./cabal install cabal-install' http://superuser.com/questions/481388/what-is-a-good-method-to를 참조하십시오. -solve-cabal-install-problems – wovenhead

5

이전에 zlib1g-dev 패키지를 설치하십시오.

+0

이것은 정확히 내가 필요한 것입니다. Google을 통해이 문제에 걸린 다른 사용자의 경우 내 시스템은 우분투 64 비트 14.04였습니다. –

3

Sam Heather의 답변이 나에게 적합하지 않습니다 (즉, 끈적 비트를 /tmp에서 삭제). 대신 Github에서 cabal v1.20.2를 다운로드하고 bootstrap.sh 스크립트를 실행했습니다 (README 참조).

+0

잘 알고 있습니다 - 공유해 주셔서 감사합니다. –

1

ghc-pkg recache으로 비슷한 오류를 수정했는데 실제로 실패한 빌드 프로세스에서 어딘가 언급되었습니다. 아마도 같은 버전의 Haskell 플랫폼을 다시 설치했을 것입니다.