堆栈安装curl失败

问题描述 投票:0回答:1

我正在尝试使用通过stack install curl-1.3.8 -v安装curl,并且遇到以下错误:

2019-10-06 19:01:22.673216: [info] curl> Configuring curl-1.3.8...
2019-10-06 19:01:22.910469: [warn] curl> setup: Missing dependency on a foreign library:
2019-10-06 19:01:22.910594: [warn] curl> * Missing (or bad) C library: curl
2019-10-06 19:01:22.910679: [warn] curl> This problem can usually be solved by installing the system package that
2019-10-06 19:01:22.910776: [warn] curl> provides this library (you may need the "-dev" version). If the library is
2019-10-06 19:01:22.910892: [warn] curl> already installed but in a non-standard location then you can use the flags
2019-10-06 19:01:22.910970: [warn] curl> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
2019-10-06 19:01:22.911056: [warn] curl> library file does exist, it may contain errors that are caught by the C
2019-10-06 19:01:22.911192: [warn] curl> compiler at the preprocessing stage. In this case you can re-run configure
2019-10-06 19:01:22.911261: [warn] curl> with the verbosity flag -v3 to see the error messages.
2019-10-06 19:01:22.911335: [warn] curl> 
2019-10-06 19:01:22.918187: [error] 
--  While building package curl-1.3.8 using:
      /tmp/stack13678/curl-1.3.8/.stack-work/dist/x86_64-linux/Cabal-
2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 
configure --user --package-db=clear --package-db=global --package-db=/home
/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b  /8.4.3
/pkgdb --libdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/lib --bindir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/bin --datadir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b   /8.4.3
/share --libexecdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/libexec --sysconfdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/etc --docdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b  /8.4.3
/doc/curl-1.3.8 --htmldir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --haddockdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --dependency=base=base-4.11.1.0 
--dependency=bytestring=bytestring-0.10.8.2 
--dependency=containers=containers-0.5.11.0 -fnew-base --exact-configuration
--ghc-option=-fhide-source-paths

    Process exited with code: ExitFailure 1

任何想法我该如何解决?

Stack version: 2.1.3
Description:    Ubuntu 19.04
shell haskell cabal haskell-stack
1个回答
0
投票

正如您收到的错误消息所说,“通常可以通过安装提供此库的系统软件包来解决此问题(您可能需要“ -dev”版本)”。在您的情况下,您需要libcurl-dev包装。根据您的首选TLS库,运行sudo apt-get install libcurl4-openssl-devsudo apt-get install libcurl4-nss-devsudo apt-get install libcurl4-gnutls-dev之一。

© www.soinside.com 2019 - 2024. All rights reserved.