checking for cURL in default path… not found?

/ 6评 / 0

今晚弄某VPS,结果一句

checking for cURL in default path… not found

把我快给玩疯了,还好有我大Google在,哦,还有我大啥都傻克斯的不懈努力,最后终解决。
下面为简单记录,其实是Evernote里的贴上来。


源起:

checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/

Google来的解决方法:

apt-get install libcurl4-gnutls-dev

然而:

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:
libcurl4-gnutls-dev : Depends: libgnutls-dev but it is not going to be installed
Depends: libldap2-dev but it is not going to be installed
Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

可以看出是缺少ibgnutls-dev,libldap2-dev,librtmp-dev这三个依赖包,所以继续:

apt-get install libgnutls-dev

然而:

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:
libgnutls-dev : Depends: libp11-kit-dev (>= 0.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

这是问题的问题的问题,简单的说就是孙子犯错,爷爷背锅。
问题是缺失名为libp11-kit-dev版本还要至少为0.4的依赖包,所以:

apt-get install libp11-kit-dev

然而问题又来了:

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:
libp11-kit-dev : Depends: libp11-kit0 (= 0.12-3) but 0.20.7-1~bpo70+1 is to be installed
E: Unable to correct problems, you have held broken packages.

 

要炸的感觉懂吗?满满的蝴蝶效应既视感懂吗?
这问题是安装libp11-kit-dev要求依赖包libp11-kit0版本为0.12-3,但现有的版本是0.20.7-1~bpo70+1,
所以,要让它Downgrade:

aptitude install libp11-kit0=0.12-3

万恶的提示又出现了,这次是降级需要先移除部分组件:

The following packages will be DOWNGRADED:
libp11-kit0
The following packages will be REMOVED:
libonig2{u} libqdbm14{u}
0 packages upgraded, 0 newly installed, 1 downgraded, 2 to remove and 9 not upgraded.
Need to get 51.8 kB of archives. After unpacking 915 kB will be freed.
The following packages have unmet dependencies:
libgnutls-deb0-28 : Depends: libp11-kit0 (>= 0.20.7) but 0.12-3 is to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
1) cloud-init
2) cmake
3) curl
4) git
5) libcurl3
6) libcurl3-gnutls
7) libgnutls-deb0-28
8) libldap-2.4-2
9) libxmlrpc-core-c3
10) python-pycurl
11) python-software-properties

Accept this solution? [Y/n/q/?] Y

好了,降级成功,那么one more again~

apt-get install libp11-kit-dev
apt-get install libgnutls-dev
apt-get install libldap2-dev
apt-get install librtmp-dev
apt-get install libcurl4-gnutls-dev

世界终于清静,鲜红的太阳终于从东方冉冉升起!
然后?就没有然后了~

总结下完整顺序:

  1. aptitude install libp11-kit0=0.12-3 #降级
  2. apt-get install libp11-kit-dev
  3. apt-get install libgnutls-dev
  4. apt-get install libldap2-dev
  5. apt-get install librtmp-dev
  6. apt-get install libcurl4-gnutls-dev

Done, have fun~


最后我还是忍不住要黑一下某家V开头的服务商,Debian7 32Bit的模板就是这么奇葩奇葩奇葩葩葩葩~

时隔五年多没写东西,发上一篇文章时我还是学生,WordPress都从2.X涨到了4.X,但域名和VPS一直都在续费,到现在才发现,我绝壁是独立博客的真爱粉。。。

 

6条回应:“checking for cURL in default path… not found?”

  1. stan说道:

    特地去看了下前一篇文章,还真是10年的东西了
    僵尸了那么久。。。

  2. axiu说道:

    你这突然诈尸就搞一篇这个出来,请问下你的心路历程

    • Leo.N说道:

      @axiu 毕业前最后写了那篇,然后就工作了,然后就没时间折腾这些东西,时间一长慢慢热情就消退了,但这几天忽然感觉又有了点激情,所以又来折腾两下子,换个VPS,配置环境,出了点问题就记录记录。。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据