首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法升级到Linux中的最新版本

无法升级到Linux中的最新版本
EN

Stack Overflow用户
提问于 2015-06-08 12:06:23
回答 3查看 1.2K关注 0票数 2

我正在尝试将阴谋升级到最新版本,因为当前版本有一个bug:

代码语言:javascript
复制
cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library 

 which cabal
/usr/bin/cabal

curl http://hackage.haskell.org/package/cabal-install-1.22.3.0/cabal-install-1.22.0.3.tar.gz
tar xvfz cabal-install-1.22.3.0.tar.gz
cd cabal-install-1.22.3.0
cabal install

中安装CACAL1.22.3.0似乎是,但是其中没有bin目录,只有share, packages, logs, lib目录,我无法在文件夹中找到可执行文件。

我能找到我刚安装的那个新的阴谋集团吗?

更新:

代码语言:javascript
复制
cabal update
cabal install cabal-install
...................
checking for sendfile in sys/socket.h... no
checking for gethostent... yes
checking for accept4... yes
configure: creating ./config.status
config.status: creating network.buildinfo
config.status: creating include/HsNetworkConfig.h
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
Building network-2.6.2.0...
Preprocessing library network-2.6.2.0...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install network-2.6.2.0
Configuring old-locale-1.0.0.7...
Building old-locale-1.0.0.7...
Preprocessing library old-locale-1.0.0.7...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install old-locale-1.0.0.7
Configuring random-1.1...
Building random-1.1...
Preprocessing library random-1.1...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install random-1.1
Configuring stm-2.4.4...
Building stm-2.4.4...
Preprocessing library stm-2.4.4...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install stm-2.4.4
Configuring text-1.2.1.1...
Building text-1.2.1.1...
Preprocessing library text-1.2.1.1...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install text-1.2.1.1
Configuring zlib-0.5.4.2...
Building zlib-0.5.4.2...
Preprocessing library zlib-0.5.4.2...
ghc: ghc no longer supports single-file style package databases (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with the correct format.
Failed to install zlib-0.5.4.2
cabal: Error: some packages failed to install:
HTTP-4000.2.19 depends on text-1.2.1.1 which failed to install.
cabal-install-1.22.4.0 depends on zlib-0.5.4.2 which failed to install.
mtl-2.2.1 failed during the building phase. The exception was:
ExitFailure 1
network-2.6.2.0 failed during the building phase. The exception was:
ExitFailure 1
network-uri-2.6.0.3 depends on text-1.2.1.1 which failed to install.
old-locale-1.0.0.7 failed during the building phase. The exception was:
ExitFailure 1
old-time-1.1.0.3 depends on old-locale-1.0.0.7 which failed to install.
parsec-3.1.9 depends on text-1.2.1.1 which failed to install.
random-1.1 failed during the building phase. The exception was:
ExitFailure 1
stm-2.4.4 failed during the building phase. The exception was:
ExitFailure 1
text-1.2.1.1 failed during the building phase. The exception was:
ExitFailure 1
zlib-0.5.4.2 failed during the building phase. The exception was:
ExitFailure 1
EN

回答 3

Stack Overflow用户

发布于 2015-09-10 09:12:09

目前,在ghc-7.10中,似乎没有办法从1.16升级阴谋安装(在删除.ghc时,它随附并恢复到)。

解决办法:

  • 安装ghc-7.8和
  • 升级阴谋-安装
  • 切换回ghc-7.10

https://mail.haskell.org/pipermail/haskell-cafe/2014-December/117512.html

幸运的是,我已经准备好了一个脚本,可以在全球范围内切换版本:

代码语言:javascript
复制
#!/bin/bash -e

if [ $# -ne 1 ]; then
 echo "usage: $0 <version> \# e.g.: $0 7.8.3 - being run for example in /usr/local/bin"
 exit 1
fi

VERSION=$1

sudo rm ghc
sudo ln -s ghc-${VERSION} ghc

sudo rm ghci
sudo ln -s ghci-${VERSION} ghci

sudo rm ghc-pkg
sudo ln -s ghc-pkg-${VERSION} ghc-pkg

sudo rm haddock 
sudo ln -s haddock-ghc-${VERSION} haddock

sudo rm runghc
sudo ln -s runghc-${VERSION} runghc

(可能需要根据您的ghc安装情况进行调整。)

票数 1
EN

Stack Overflow用户

发布于 2015-06-08 12:08:21

尝试使用阴谋本身安装它:

代码语言:javascript
复制
cabal update
cabal install cabal-install
票数 0
EN

Stack Overflow用户

发布于 2015-06-08 13:04:34

运行cabal installcabal build之后,在./dist/build/cabal/中查找构建的阴谋二进制文件。

您还可以使用以下菜谱:

代码语言:javascript
复制
cabal get cabal-install
cd cabal-install-1.22.4.0   # or whatever the get command says
cabal build
# binary resides in dist/build/cabal
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30708737

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档