[英]cabal: error while loading shared libraries: libHSzlib-0.5.4.1-ghc7.6.3.so
I've done a fresh install of the Haskell platform on CentOS 7, like so: 我在CentOS 7上完成了Haskell平台的全新安装,如下所示:
[amy@wombat115 ~]$ sudo yum install haskell-platform
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered with Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: ftp.sunet.se
* epel: ftp.lysator.liu.se
* extras: ftp.sunet.se
* updates: ftp.sunet.se
Resolving Dependencies
--> Running transaction check
---> Package haskell-platform.x86_64 0:2013.2.0.0-36.el7 will be installed
--> Processing Dependency: ghc-haskell-platform-devel = 2013.2.0.0-36.el7 for package: haskell-platform-2013.2.0.0-36.el7.x86_64
--> Processing Dependency: cabal-install = 1.16.0.2 for package: haskell-platform-2013.2.0.0-36.el7.x86_64
--> Running transaction check
---> Package cabal-install.x86_64 0:1.16.0.2-32.el7 will be installed
---> Package ghc-haskell-platform-devel.x86_64 0:2013.2.0.0-36.el7 will be installed
--> Processing Dependency: ghc = 7.6.3 for package: ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64
--> Running transaction check
---> Package ghc.x86_64 0:7.6.3-18.3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Installing:
haskell-platform x86_64 2013.2.0.0-36.el7 epel 12 k
Installing for dependencies:
cabal-install x86_64 1.16.0.2-32.el7 epel 452 k
ghc x86_64 7.6.3-18.3.el7 epel 35 k
ghc-haskell-platform-devel x86_64 2013.2.0.0-36.el7 epel 15 k
Transaction Summary
=====================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 514 k
Installed size: 2.9 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): haskell-platform-2013.2.0.0-36.el7.x86_64.rpm | 12 kB 00:00:00
(2/4): ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64.rpm | 15 kB 00:00:00
(3/4): ghc-7.6.3-18.3.el7.x86_64.rpm | 35 kB 00:00:00
(4/4): cabal-install-1.16.0.2-32.el7.x86_64.rpm | 452 kB 00:00:01
-------------------------------------------------------------------------------------------------------------------------------------
Total 461 kB/s | 514 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ghc-7.6.3-18.3.el7.x86_64 1/4
Installing : ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64 2/4
/var/tmp/rpm-tmp.5ERaqJ: line 1: /usr/bin/ghc-pkg: No such file or directory
Installing : cabal-install-1.16.0.2-32.el7.x86_64 3/4
Installing : haskell-platform-2013.2.0.0-36.el7.x86_64 4/4
Verifying : cabal-install-1.16.0.2-32.el7.x86_64 1/4
Verifying : ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64 2/4
Verifying : ghc-7.6.3-18.3.el7.x86_64 3/4
Verifying : haskell-platform-2013.2.0.0-36.el7.x86_64 4/4
Installed:
haskell-platform.x86_64 0:2013.2.0.0-36.el7
Dependency Installed:
cabal-install.x86_64 0:1.16.0.2-32.el7 ghc.x86_64 0:7.6.3-18.3.el7 ghc-haskell-platform-devel.x86_64 0:2013.2.0.0-36.el7
Complete!
But I get the following error: 但是我收到以下错误:
[amy@wombat115 ~]$ cabal update
cabal: error while loading shared libraries: libHSzlib-0.5.4.1-ghc7.6.3.so: cannot open shared object file: No such file or directory
I have tried the following, to no effect: 我试过以下,没有效果:
sudo yum reinstall ghc-zlib-devel
sudo yum reinstall zlib-devel
sudo yum reinstall ghc-ghc-devel
EDIT: I have also tried the following: 编辑:我也尝试了以下内容:
sudo yum reinstall ghc-zlib-devel-0.5.4.1
sudo yum reinstall ghc-zlib-devel-0.5.4.1-26.el7
sudo yum reinstall cabal-install
sudo yum reinstall ghc-Cabal
EDIT: If yum whatprovides libHSzlib*ghc*
is to be believed, ghc-zlib-devel
installs libHSzlib-0.5.4.1-ghc7.6.3.so
. 编辑:如果
yum whatprovides libHSzlib*ghc*
是yum whatprovides libHSzlib*ghc*
, ghc-zlib-devel
将安装libHSzlib-0.5.4.1-ghc7.6.3.so
。 However, the only file find / -name 'libHSzlib*.so' returns is
libHSzlib-0.5.4.1-ghc7.8.3.so` (note the 8 vs. 6 ). 但是,唯一的文件
find / -name 'libHSzlib*.so' returns is
libHSzlib-0.5.4.1-ghc7.8.3.so`(注意8对6 )。
Here's how I solved the problem: 这是我解决问题的方法:
First, I installed ghc manually. 首先,我手动安装了ghc。
wget https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz
tar xvf ghc-7.8.4-i386-unknown-linux-deb7.tar.xz
cd ghc-7.8.4
sudo mkdir /usr/local/ghc-7.8.4
./configure --prefix=/usr/local/ghc-7.8.4
NOTE: Even though the version I installed was made on a Debian 7 "wheezey" system and supposedly only requires libgmp.so.10
, I got error messages about libgmp.so.3
. 注意:即使我安装的版本是在Debian 7“wheezey”系统上制作的,据说只需要
libgmp.so.10
,我收到有关libgmp.so.3
错误消息。 I worked around that by doing the following, which I know is a bad thing to do : 我通过执行以下操作来解决这个问题,我知道这是件坏事 :
sudo ln -s /usr/lib64/libgmp.so.10 /usr/lib64/libgmp.so.3
Next, I tried installing the Haskell Platform manually, using the command: 接下来,我尝试使用以下命令手动安装Haskell平台:
./platform.sh /home/amy/ghc-7.8.3-x86_64-unknown-linux-deb7.tar.xz
but I got the now familiar error messages about libHSzlib-0.5.4.1-ghc7.6.3.so
. 但我收到了关于
libHSzlib-0.5.4.1-ghc7.6.3.so
的现在熟悉的错误消息。
So I manually installed cabal. 所以我手动安装了cabal。
git clone https://github.com/haskell/cabal.git
cd cabal/Cabal
ghc -threaded --make Setup
./Setup configure
./Setup build
sudo ./Setup install
cd ../cabal-install
./bootstrap.sh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.