不能找到libcurl或curl。h(RuntimeError)

时间:2022-03-05 20:39:47

I am trying to install curb 0.8.0 on a Windows computer but I can not seem to get anywhere. I have been trying every website 3 pages deep on my Google search. Please, anyone have an idea of how I can get this single thing installed. I have downloaded curl and extracted it to C:\curl. I have added it to my path and am running the command:

我想在Windows电脑上安装0。8.0,但是我好像什么都没做。我在谷歌上搜索了每个网站3页。拜托,谁知道怎么安装这个东西。我下载了curl并将其解压缩到C:\curl。我已经将它添加到我的路径中,并正在运行以下命令:

gem install curb -- --with-curl-lib=C:\curl\bin --with-curl-include=C:\curl\include

But it doesn't work. I keep getting the same error. Any suggestions?

但它不工作。我总是得到相同的误差。有什么建议吗?

6 个解决方案

#1


8  

The curb gem requires libcurl, something that is related to, but different from curl. It's the library that curl is built with. That missing file is part of the development version of cURL.

边缘宝石需要libcurl,与之相关,但与curl不同。curl是用这个库构建的。这个缺失的文件是cURL开发版本的一部分。

#2


112  

If you are on ubuntu:

如果你使用ubuntu:

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

#3


5  

type this to get rid of curl/curl.h error

输入这个来去除旋度/旋度。h错误

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

after this you will get a freeTDS error if you haven't installed it previously

在此之后,如果您之前没有安装freeTDS,您将会得到一个错误

Try running

尝试运行

sudo apt-get install freetds-dev

and after this

而在此之后

gem install tiny_tds

#4


4  

For Amazon Linux (perhaps also centos/redhat/fedora) do this:

对于Amazon Linux(可能还包括centos/redhat/fedora),请执行以下操作:

sudo yum install libcurl libcurl-devel

#5


2  

Such header files are usually packaged in a xxx-dev package. In this case libcurl-dev.

这样的头文件通常打包在xxx-dev包中。在这种情况下libcurl-dev。

Usually they also provide "virtual" packages that resolve to latest version of a package. In case there are multiple implementation available then it'll list and ask you to pick the one you want, else it'll go ahead and select the latest one.

通常,他们还提供“虚拟”包,以解析包的最新版本。如果有多个实现可用,那么它会列出并要求您选择您想要的实现,否则它将继续并选择最新的实现。

vagrant@my_box $ sudo apt-get install libcurl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libcurl-dev is a virtual package provided by:
  libcurl4-openssl-dev 7.22.0-3ubuntu4.17
  libcurl4-nss-dev 7.22.0-3ubuntu4.17
  libcurl4-gnutls-dev 7.22.0-3ubuntu4.17
You should explicitly select one to install.

E: Package 'libcurl-dev' has no installation candidate
vagrant@my_box $ # I pick gnu implementation version 4.
vagrant@my_box $ sudo apt-get install libcurl4-gnutls-dev
...
vagrant@my_box $ 

See all versions:

看到所有版本:

$ aptitude versions libcurl
Package libcurl-ocaml:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml-dev:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml-dev:i386:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml:i386:
p   0.5.3-2build3                      precise        500

Package libcurl3:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.15                                100
p   7.22.0-3ubuntu4.17                 precise-securi 500

......

Package libcurl3-gnutls:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

......

Package libcurl4-gnutls-dev:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-gnutls-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500
......

$ # see only curl4 related stuff
$ aptitude versions libcurl4
Package libcurl4-gnutls-dev:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-gnutls-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-nss-dev:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-nss-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-openssl-dev:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-openssl-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500
$
$

If you don't name of dev lib you can do a blind search like (greps for virtual packages):

如果你没有dev lib的名字,你可以做一个盲搜索(greps用于虚拟包):

$ aptitude search curl | grep dev | grep ^v
v   libcurl-dev                     -
v   libcurl-dev:i386                -
v   libcurl-ocaml-dev-g55y9         -
v   libcurl-ocaml-dev-owsj4:i386    -
v   libcurl-ssl-dev                 -
v   libcurl-ssl-dev:i386            -
v   libcurl3-dev                    -
v   libcurl3-dev:i386               -
v   libcurl3-gnutls-dev             -
v   libcurl3-gnutls-dev:i386        -
v   libcurl3-nss-dev                -
v   libcurl3-nss-dev:i386           -
v   libcurl3-openssl-dev            -
v   libcurl3-openssl-dev:i386       -
v   libcurl4-dev                    -
v   libcurl4-dev:i386               -
v   libghc-curl-dev-1.3.7-134ce:i38 -
v   libghc-curl-dev-1.3.7-26a38     -
v   libghc-download-curl-dev-0.1.3. -
v   libghc-download-curl-dev-0.1.3. -
v   libghc-hxt-curl-dev-9.1.1-66e48 -
v   libghc-hxt-curl-dev-9.1.1-66e48 -
$

#6


2  

If you are on alpine:

如果你在阿尔卑斯山脉:

apk add --update curl-dev

#1


8  

The curb gem requires libcurl, something that is related to, but different from curl. It's the library that curl is built with. That missing file is part of the development version of cURL.

边缘宝石需要libcurl,与之相关,但与curl不同。curl是用这个库构建的。这个缺失的文件是cURL开发版本的一部分。

#2


112  

If you are on ubuntu:

如果你使用ubuntu:

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

#3


5  

type this to get rid of curl/curl.h error

输入这个来去除旋度/旋度。h错误

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

after this you will get a freeTDS error if you haven't installed it previously

在此之后,如果您之前没有安装freeTDS,您将会得到一个错误

Try running

尝试运行

sudo apt-get install freetds-dev

and after this

而在此之后

gem install tiny_tds

#4


4  

For Amazon Linux (perhaps also centos/redhat/fedora) do this:

对于Amazon Linux(可能还包括centos/redhat/fedora),请执行以下操作:

sudo yum install libcurl libcurl-devel

#5


2  

Such header files are usually packaged in a xxx-dev package. In this case libcurl-dev.

这样的头文件通常打包在xxx-dev包中。在这种情况下libcurl-dev。

Usually they also provide "virtual" packages that resolve to latest version of a package. In case there are multiple implementation available then it'll list and ask you to pick the one you want, else it'll go ahead and select the latest one.

通常,他们还提供“虚拟”包,以解析包的最新版本。如果有多个实现可用,那么它会列出并要求您选择您想要的实现,否则它将继续并选择最新的实现。

vagrant@my_box $ sudo apt-get install libcurl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libcurl-dev is a virtual package provided by:
  libcurl4-openssl-dev 7.22.0-3ubuntu4.17
  libcurl4-nss-dev 7.22.0-3ubuntu4.17
  libcurl4-gnutls-dev 7.22.0-3ubuntu4.17
You should explicitly select one to install.

E: Package 'libcurl-dev' has no installation candidate
vagrant@my_box $ # I pick gnu implementation version 4.
vagrant@my_box $ sudo apt-get install libcurl4-gnutls-dev
...
vagrant@my_box $ 

See all versions:

看到所有版本:

$ aptitude versions libcurl
Package libcurl-ocaml:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml-dev:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml-dev:i386:
p   0.5.3-2build3                      precise        500

Package libcurl-ocaml:i386:
p   0.5.3-2build3                      precise        500

Package libcurl3:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.15                                100
p   7.22.0-3ubuntu4.17                 precise-securi 500

......

Package libcurl3-gnutls:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

......

Package libcurl4-gnutls-dev:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-gnutls-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500
......

$ # see only curl4 related stuff
$ aptitude versions libcurl4
Package libcurl4-gnutls-dev:
p   7.22.0-3ubuntu4                    precise        500
i   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-gnutls-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-nss-dev:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-nss-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-openssl-dev:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500

Package libcurl4-openssl-dev:i386:
p   7.22.0-3ubuntu4                    precise        500
p   7.22.0-3ubuntu4.17                 precise-securi 500
$
$

If you don't name of dev lib you can do a blind search like (greps for virtual packages):

如果你没有dev lib的名字,你可以做一个盲搜索(greps用于虚拟包):

$ aptitude search curl | grep dev | grep ^v
v   libcurl-dev                     -
v   libcurl-dev:i386                -
v   libcurl-ocaml-dev-g55y9         -
v   libcurl-ocaml-dev-owsj4:i386    -
v   libcurl-ssl-dev                 -
v   libcurl-ssl-dev:i386            -
v   libcurl3-dev                    -
v   libcurl3-dev:i386               -
v   libcurl3-gnutls-dev             -
v   libcurl3-gnutls-dev:i386        -
v   libcurl3-nss-dev                -
v   libcurl3-nss-dev:i386           -
v   libcurl3-openssl-dev            -
v   libcurl3-openssl-dev:i386       -
v   libcurl4-dev                    -
v   libcurl4-dev:i386               -
v   libghc-curl-dev-1.3.7-134ce:i38 -
v   libghc-curl-dev-1.3.7-26a38     -
v   libghc-download-curl-dev-0.1.3. -
v   libghc-download-curl-dev-0.1.3. -
v   libghc-hxt-curl-dev-9.1.1-66e48 -
v   libghc-hxt-curl-dev-9.1.1-66e48 -
$

#6


2  

If you are on alpine:

如果你在阿尔卑斯山脉:

apk add --update curl-dev