Recentemente mudei para o Ubuntu 16.04 e tive uma quantidade sem precedentes de problemas para fazer a cabal trabalhar. Cabal 1.22 está atualmente instalado e "trabalhando" ...
Eu tentei instalar um pacote que escrevi como um teste, mas depende da base > = 4.10, que a cabala 1.22 aparentemente não consegue acessar:
cabal update
cabal install base
Resolving dependencies...
All the requested packages are already installed:
base-4.9.1.0
Use --reinstall if you want to reinstall anyway.
cabal install base-4.10
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: base (user goal)
rejecting: base-4.10.0.0, 4.9.1.0/installed-4.9..., 4.9.1.0, 4.9.0.0, 4.8.2.0,
4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0,
4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0,
4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires ==4.10)
Dependency tree exhaustively searched.
Então eu tentei instalar a versão mais recente da cabala:
Resolving dependencies...
Configuring zlib-0.6.2...
Failed to install zlib-0.6.2
Build log ( /home/ebanflo/.cabal/logs/zlib-0.6.2.log ):
Configuring zlib-0.6.2...
setup-Simple-Cabal-2.2.0.1-x86_64-linux-ghc-8.0.2: Missing dependency on a
foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
cabal: Error: some packages failed to install:
cabal-install-2.2.0.0 depends on zlib-0.6.2 which failed to install.
hackage-security-0.5.3.0 depends on zlib-0.6.2 which failed to install.
zlib-0.6.2 failed during the configure step. The exception was:
ExitFailure 1
Eu tentei instalar zlib
e recebi a mesma mensagem de erro.
Eu estava tentado a fazer o upload de uma nova versão do meu pacote com dependências menores para ver se funcionaria, mas ainda não, porque essa é uma solução estúpida, pois ainda não poderei baixar pacotes com essas dependências inacessíveis.
ATUALIZAÇÃO:
Eu tentei instalar zlib1g-dev
do repositório apt
:
sudo apt install zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-2ubuntu4) but 1:1.2.8.dfsg-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Então, tentei instalar a versão não-dev:
sudo apt install zlib1g
Reading package lists... Done
Building dependency tree
Reading state information... Done
zlib1g is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Eu tentei algumas coisas para instalar 1.2.8.dfsg-2ubuntu4
, mas acho que não sei a sintaxe adequada. Eu também tentei purge
e autoremove
zlib1g e recebi a seguinte mensagem de erro para os dois comandos:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
crda : Depends: libssl1.0.0 (>= 1.0.0) but it is not going to be installed
libical1a : Depends: tzdata but it is not going to be installed
mount : PreDepends: libblkid1 (>= 2.17.2) but it is not going to be installed
PreDepends: libmount1 (>= 2.25) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Em seguida, vou tentar instalar o Haskell zlib mencionado nos comentários diretamente do pacote fonte cabal.
Baixou, extraiu, executou ghc Setup
e tentou executar ./Setup configure
e recebeu a seguinte mensagem de erro:
Configuring zlib-0.6.2...
Setup: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Bem, isso deve estar bem, eu tenho alguma versão do zlib1g
instalado, ou assim eu pensei. Depois de executar dpkg -L zlib
, descobri que não há arquivos binários para zlib
. Estou totalmente perdida.