2015-06-08 1 views
2

Я пытаюсь обновить междусобойчик до последней версии, поскольку текущая версия содержит ошибку:Невозможно обновить заговорщик до последней версии в Linux

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 

Это кажется установить Кабалы 1.22.3.0 в ~/.cabal, но в каталоге нет bin, есть только share, packages, logs, lib каталогов и я не могу найти исполняемый файл в папке.

Могу ли я найти новую камеру, которую я только что установил?

UPDATE:

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 

ответ

0

Попробуйте установить его с помощью междусобойчик себя:

cabal update 
cabal install cabal-install 
+0

посмотреть на мое обновление пожалуйста. –

+0

@jawanam Какую платформу/ОС и версию вы используете? – sinelaw

0

После запуска либо cabal install или cabal build, смотрите в ./dist/build/cabal/ для встроенного Кабал двоичного файла.

Вы также можете использовать этот рецепт:

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 
1

В настоящее время в GHC-7.10, кажется, нет никакого способа обновить междусобойчик установить с 1.16 (который поставляется с и возвращается к при удалении .ghc) ,

Обход:

  • установки GHC-7,8 и
  • обновление междусобойчик установить
  • переключатель обратно в GHC-7.10

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

К счастью для меня, я уже был готов сценарий для переключения версий по всему миру:

#!/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.)

+0

Работает так, как рекламируется. Одно замечание: вам может понадобиться создать мягкую ссылку для 'hsc2hs', так как' cabal-install' не будет устанавливать для меня иначе. – somesoaccount

+0

Ну, теперь я больше не буду использовать cabal-install. Я полностью переключился на стек, что делает эту ситуацию устаревшей для меня. – axm

+0

На самом деле я хотел «установить инсталляцию стека», но это работает только с последней версией cabal, поэтому мне пришлось сначала обновить cabal. Вероятно, было бы проще, но для меня это было достаточно хорошо. – somesoaccount