2015-06-08 1 views
2

Я пытаюсь обновить Cabal на Linux:Невозможно обновить Кабал себя

$ cabal --version 
cabal-install version 1.16.0.2 
using version 1.16.0 of the Cabal library 

И я получаю много ошибок:

$ cabal install cabal 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 
+0

Вы также обновили GHC? –

ответ

1

Скорее всего, что произошло в том, что вы модернизированную GHC и GHC 7.10 требует Cabal 1.22, в противном случае появляется ошибка 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.. Так как вы на Ubuntu вы можете установить cabal-install из the PPA:

sudo apt-add-repository ppa:hvr/ghc 
sudo apt-get update && sudo apt-get install cabal-install-1.22 

Поскольку PPA установить местоположение не в PATH можно либо добавить /opt/cabal/1.22/bin в свой PATH, или необязательно запускать /opt/cabal/1.22/bin/cabal install cabal, если вы предпочитаете иметь все ваши двоичные файлы Haskell в одном месте, а затем удалите cabal-install с apt-get.

В противном случае существуют бинарные файлы, доступные по адресу haskell.org.

+0

Другая возможность заключается в том, что у вас установлена ​​устаревшая версия cabal. Попробуйте 'type cabal' и rm при необходимости. – Joe

 Смежные вопросы

  • Нет связанных вопросов^_^