Installation failed

Oleg Grenrus oleg.grenrus at iki.fi
Fri May 31 08:46:56 UTC 2019


Sorry, I wrote non-sense, the command is

cabal user-config update

--

cabal-install-3.0.0.0 is the latest (and in fact non-released) version 
you can have. Your last (failed) attempt actually wanted to install 
cabal-install-2.4.1.0!

Reinstalling cabal-install (from Hackage) via cabal-install is currently 
not well exercised codepath. People usually install cabal from either 
Herbert's PPA, via ghcup or chocolatey package managers. So even I don't 
see reason installing cabal-install via cabal-install shouldn't work, I 
don't recommend it.

The zlib.h failure is related to no zlib library - development parts 
installed. On Ubuntu the headers can be installed by "apt-get install 
zlib1g-dev". Unfortunately I have no experience with WSL, if that's as 
easy there.

- Oleg

On 31.5.2019 11.17, Simon Peyton Jones wrote:
>
> Few points, If you run Windows 10 (Pro?), you can setup to make 
> symlinks without needing administrator privileges
>
> Actually I’ve now switched to using the Windows Subsytem for Linux 
> (WSL), which works pretty well and means that I don’t need to be the 
> beta-tester for windows :-).   I should have said – this thread is 
> about Ubuntu Linux in WSL.
>
> - `cabal update-config` should populate your ~/.cabal/config with new 
> default configuration. which will have install-dir: there too. You can 
> also manually edit it to add the new configuration option.
>
> Alas not:
>
> bash$ cabal update-config
>
> cabal: unrecognised command: update-config (try --help)
>
> bash$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> Perhaps my cabal is out of date.  Hmm.  Maybe I should try to update it?
>
> bash$ cabal update cabal
>
> cabal: 'v2-update' repo(s): "cabal" can not be found in known remote 
> repo(s):
>
> hackage.haskell.org
>
> Nope.  Maybe I should just install it afresh?  Maybe that would update it?
>
> basj$ cabal install cabal
>
> Resolving dependencies...
>
> cabal: Could not resolve dependencies:
>
> [__0] trying: cabal-0.0.0.0 (user goal)
>
> [__1] unknown package: youProbablyWantCapitalCabal (dependency of cabal)
>
> [__1] fail (backjumping, conflict set: cabal, youProbablyWantCapitalCabal)
>
> After searching the rest of the dependency tree exhaustively, these 
> were the
>
> goals I've had most trouble fulfilling: cabal, youProbablyWantCapitalCabal
>
> Oh dear.  I have a vague hind-brain memory that you have to install 
> “cabal-install” rather than “cabal”.   Let’s try that.
>
> <long output shown later>
>
> That failed too.  Clutching at straws, that 
> “youProbablyWantCapitalCabal” is suggestive. Let’s try:
>
> bash$ cabal install Cabal
>
> Resolving dependencies...
>
> Up to date
>
> cabal: installdir is not defined. Set it in your cabal config file or use
>
> --installdir=<path>
>
> Back to that again.
>
> I’m not truly stuck on any of this.  But somehow my high failure rate 
> is discouraging, and I thought you’d probably want to know how I stumbled.
>
> Where could I read about the difference between “cabal install Cabal” 
> and “cabal install cabal-install”?
>
> Simon
>
> Here’s the cabal install cabal-install output, which has a totally new 
> failure.  Something about zlib.h, but I have no idea how to fix it.
>
> simonpj at MSRC-3645512:~/tmp$ cabal install cabal-install
>
> Resolving dependencies...
>
> Build profile: -w ghc-8.6.4 -O1
>
> In order, the following will be built (use -v for more details):
>
> - async-2.2.1 (lib) (requires download & build)
>
> - base16-bytestring-0.1.1.6 (lib:base16-bytestring) (requires download 
> & build)
>
> - base64-bytestring-1.0.0.2 (lib) (requires build)
>
> - cryptohash-sha256-0.11.101.0 (lib) (requires download & build)
>
> - digest-0.0.1.2 (lib:digest) (requires download & build)
>
> - echo-0.1.3 (lib) (requires download & build)
>
> - ed25519-0.0.5.0 (lib) (requires download & build)
>
> - edit-distance-0.2.2.1 (lib) (requires download & build)
>
> - hsc2hs-0.68.4 (exe:hsc2hs) (requires download & build)
>
> - network-uri-2.6.1.0 (lib) (requires download & build)
>
> - tar-0.5.1.0 (lib) (requires download & build)
>
> - zlib-0.6.2 (lib) (requires download & build)
>
> - resolv-0.1.1.2 (lib:resolv) (requires download & build)
>
> - network-3.1.0.0 (lib:network) (requires download & build)
>
> - zip-archive-0.4.1 (lib) (requires download & build)
>
> - hackage-security-0.5.3.0 (lib) (requires download & build)
>
> - HTTP-4000.3.13 (lib) (requires download & build)
>
> - cabal-install-2.4.1.0 (exe:cabal) (requires download & build)
>
> Downloading  base16-bytestring-0.1.1.6
>
> Starting     base64-bytestring-1.0.0.2 (lib)
>
> Downloaded   base16-bytestring-0.1.1.6
>
> Downloading  cryptohash-sha256-0.11.101.0
>
> Starting     base16-bytestring-0.1.1.6 (all, legacy fallback)
>
> Downloaded   cryptohash-sha256-0.11.101.0
>
> Downloading  digest-0.0.1.2
>
> Starting     cryptohash-sha256-0.11.101.0 (lib)
>
> Building     base64-bytestring-1.0.0.2 (lib)
>
> Downloaded   digest-0.0.1.2
>
> Downloading  ed25519-0.0.5.0
>
> Building     base16-bytestring-0.1.1.6 (all, legacy fallback)
>
> Starting     digest-0.0.1.2 (all, legacy fallback)
>
> Downloaded   ed25519-0.0.5.0
>
> Downloading  zlib-0.6.2
>
> Starting     ed25519-0.0.5.0 (lib)
>
> Building     cryptohash-sha256-0.11.101.0 (lib)
>
> Downloaded   zlib-0.6.2
>
> Downloading  resolv-0.1.1.2
>
> Installing   base16-bytestring-0.1.1.6 (all, legacy fallback)
>
> Starting     zlib-0.6.2 (lib)
>
> Building     ed25519-0.0.5.0 (lib)
>
> Installing   base64-bytestring-1.0.0.2 (lib)
>
> Downloaded   resolv-0.1.1.2
>
> Downloading  echo-0.1.3
>
> Completed    base16-bytestring-0.1.1.6 (all, legacy fallback)
>
> Completed    base64-bytestring-1.0.0.2 (lib)
>
> Downloaded   echo-0.1.3
>
> Downloading  hsc2hs-0.68.4
>
> Starting     echo-0.1.3 (lib)
>
> Downloaded   hsc2hs-0.68.4
>
> Downloading  network-3.1.0.0
>
> Starting     hsc2hs-0.68.4 (exe:hsc2hs)
>
> Installing   cryptohash-sha256-0.11.101.0 (lib)
>
> Downloaded   network-3.1.0.0
>
> Downloading  edit-distance-0.2.2.1
>
> Completed    cryptohash-sha256-0.11.101.0 (lib)
>
> Building     echo-0.1.3 (lib)
>
> Downloaded   edit-distance-0.2.2.1
>
> Downloading  tar-0.5.1.0
>
> Starting     edit-distance-0.2.2.1 (lib)
>
> Building     hsc2hs-0.68.4 (exe:hsc2hs)
>
> Downloaded   tar-0.5.1.0
>
> Downloading  async-2.2.1
>
> Starting     tar-0.5.1.0 (lib)
>
> Downloaded   async-2.2.1
>
> Downloading  network-uri-2.6.1.0
>
> Installing   echo-0.1.3 (lib)
>
> Starting     async-2.2.1 (lib)
>
> Installing   ed25519-0.0.5.0 (lib)
>
> Building     edit-distance-0.2.2.1 (lib)
>
> Downloaded   network-uri-2.6.1.0
>
> Downloading  zip-archive-0.4.1
>
> Starting     network-uri-2.6.1.0 (lib)
>
> Completed    echo-0.1.3 (lib)
>
> Completed    ed25519-0.0.5.0 (lib)
>
> Building     tar-0.5.1.0 (lib)
>
> Downloaded   zip-archive-0.4.1
>
> Downloading  HTTP-4000.3.13
>
> Building     async-2.2.1 (lib)
>
> Building     network-uri-2.6.1.0 (lib)
>
> Downloaded   HTTP-4000.3.13
>
> Downloading  hackage-security-0.5.3.0
>
> Downloaded   hackage-security-0.5.3.0
>
> Downloading  cabal-install-2.4.1.0
>
> Downloaded   cabal-install-2.4.1.0
>
> Installing   async-2.2.1 (lib)
>
> Installing   edit-distance-0.2.2.1 (lib)
>
> Completed    async-2.2.1 (lib)
>
> Completed    edit-distance-0.2.2.1 (lib)
>
> Installing   hsc2hs-0.68.4 (exe:hsc2hs)
>
> Completed    hsc2hs-0.68.4 (exe:hsc2hs)
>
> Installing   network-uri-2.6.1.0 (lib)
>
> Completed    network-uri-2.6.1.0 (lib)
>
> Installing   tar-0.5.1.0 (lib)
>
> Completed    tar-0.5.1.0 (lib)
>
> Failed to build digest-0.0.1.2. The failure occurred during the configure
>
> step.
>
> Build log (
>
> /home/simonpj/.cabal/logs/ghc-8.6.4/digest-0.0.1.2-14bc149eb1d9c6a16b30ce20fef469dafeaea1cbba4f9615d23d3b4f1a2da8bd.log
>
> ):
>
> Configuring digest-0.0.1.2...
>
> cabal: 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.
>
> Failed to build zlib-0.6.2. The failure occurred during the configure 
> step.
>
> Build log (
>
> /home/simonpj/.cabal/logs/ghc-8.6.4/zlib-0.6.2-2039caedabd32f9ed378900645b72766a462d68bf828625f67296cbc28fa173e.log
>
> ):
>
> Configuring library for zlib-0.6.2..
>
> cabal: 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: Failed to build digest-0.0.1.2 (which is required by
>
> cabal-install-2.4.1.0). See the build log above for details.
>
> Failed to build zlib-0.6.2 (which is required by 
> cabal-install-2.4.1.0). See
>
> the build log above for details.
>
> *From:*Oleg Grenrus <oleg.grenrus at iki.fi>
> *Sent:* 30 May 2019 20:30
> *To:* Simon Peyton Jones <simonpj at microsoft.com>; cabal-devel at haskell.org
> *Subject:* Re: Installation failed
>
> Hi again Simon,
>
> Few points, If you run Windows 10 (Pro?), you can setup to make 
> symlinks without needing administrator privileges. I used 
> https://github.com/git-for-windows/git/wiki/Symbolic-Links 
> <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgit-for-windows%2Fgit%2Fwiki%2FSymbolic-Links&data=02%7C01%7Csimonpj%40microsoft.com%7Cc6505497c8274b9295f508d6e5354490%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948414300977009&sdata=jjJNh7GKC6HfcbNvLkkBHE52fnWQk1LRJOmAhV%2FHJ2E%3D&reserved=0> 
> guide. Unfortunately I don't remember all the details I did (i.e. if 
> the guide is complete), but enabling Developer Mode is easy to forget.
>
> About installing and symlinking:
> - `cabal update-config` should populate your ~/.cabal/config with new 
> default configuration. which will have install-dir: there too. You can 
> also manually edit it to add the new configuration option.
> - Most of install woes are fixed in March [1], but there weren't a 
> release with those fixes.
>
> - [1] https://github.com/haskell/cabal/pull/5870
> <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhaskell%2Fcabal%2Fpull%2F5870&data=02%7C01%7Csimonpj%40microsoft.com%7Cc6505497c8274b9295f508d6e5354490%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948414300987006&sdata=b2kP0Ywfol9QhM4x8fErpjLl7C%2By7NPHeW%2BtFwINL2k%3D&reserved=0>
>
> Cheers,
> Oleg
>
> On 30.5.2019 16.57, Simon Peyton Jones wrote:
>
>     Dear Cabal developers
>
>     More woe:
>
>     simonpj at MSRC-3645512:~$ cabal install lhs2tex
>
>     Resolving dependencies...
>
>     Up to date
>
>     cabal: installdir is not defined. Set it in your cabal config file
>     or use
>
>     --installdir=<path>
>
>     In the olden days, didn’t cabal install by default in ~/.cabal/bin?
>
>     Never mind, let’s do what it asks:
>
>     simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin
>
>     Resolving dependencies...
>
>     Up to date
>
>     Symlinking 'lhs2TeX'
>
>     /usr/bin/lhs2TeX: createSymbolicLink: permission denied
>     (Permission denied)
>
>     Darn: I need to be super-user.  Fine:
>
>     simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex
>     --installdir=/usr/bin
>
>     [sudo] password for simonpj:
>
>     cabal: unrecognized 'install' option `--installdir=/usr/bin'
>
>     OK _/now/_ I really am stumped. It asked me to provide that
>     option, and now it says it’s unrecognised.
>
>     (This is in a bash shell running in emacs, if it makes a difference.)
>
>     What next?
>
>     Thanks
>
>     Simon
>
>
>
>     _______________________________________________
>
>     cabal-devel mailing list
>
>     cabal-devel at haskell.org  <mailto:cabal-devel at haskell.org>
>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel  <https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fcabal-devel&data=02%7C01%7Csimonpj%40microsoft.com%7Cc6505497c8274b9295f508d6e5354490%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948414300987006&sdata=NWRcxeSWajRewnQ%2BmYOkVhGC5Ih0OyPj4W8pTehrg9Q%3D&reserved=0>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/cabal-devel/attachments/20190531/128bff3c/attachment-0001.html>


More information about the cabal-devel mailing list