Ubuntu 64位11.04服务器和curl安装失败
所以我想用HTTPS协议安装curl,我这样做了:
- sudo -i wget http://curl.haxx.se/download/curl-7.21.6.tar.bz2
- sudo -i tar jxf curl-7.21.6.tar.bz2
- sudo -i rm curl-7.21.6.tar.bz2
- sudo -i cd curl-7.21.6/
- sudo -i ./configure
- sudo -i make prefix=/usr/local 所有
- sudo -i make prefix=/usr/local安装
并最后尝试:sudo -i curl --version 看看我是否成功,答案是“否!”。我得到的错误在这里:
curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
So I wanted to install curl with HTTPS protocol, I did it like so:
- sudo -i wget http://curl.haxx.se/download/curl-7.21.6.tar.bz2
- sudo -i tar jxf curl-7.21.6.tar.bz2
- sudo -i rm curl-7.21.6.tar.bz2
- sudo -i cd curl-7.21.6/
- sudo -i ./configure
- sudo -i make prefix=/usr/local all
- sudo -i make prefix=/usr/local install
and last I tried: sudo -i curl --version to see if I succeeded and the answer was "No!". The error I got is here:
curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个:
ln -s /usr/local/lib/libcurl.so.4 /usr/lib/libcurl.so.4
Try this:
ln -s /usr/local/lib/libcurl.so.4 /usr/lib/libcurl.so.4
prefix=/usr/local
应在configure
中设置,例如:不在
make
中设置。但是,configure
在 autotools 中默认将前缀设置为/usr/local
,因此您无需指定它。然后只需运行:请注意,编译代码时,您应该始终以标准用户身份执行,而不是以 sudo 或 root 身份执行。仅在 make install 时执行此操作,这是您实际上需要权限才能执行 chmod 和移动文件等操作的地方。让我知道这是否适合您。
prefix=/usr/local
should be set inconfigure
instead, like:Not in
make
. However,configure
sets prefix to/usr/local
by default in autotools, so you don't need to specify that anyways. Then just run:Note that when compiling code, you should always do it as a standard user, not as sudo or root. Only do it for make install, which is where you actually need permissions to do things like chmod and moving files around. Let me know if that works for you.
尝试在 CentOs 5.0 上运行 sudo ldconfig(将符号链接从 /usr/lib/libcurl.so.4 添加到 /usr/local/lib/libcurl.so.4 后)。请参阅:http://curl.haxx.se/mail/tracker-2009 -05/0014.html
Try running
sudo ldconfig
on CentOs 5.0 (after adding a symlink from /usr/lib/libcurl.so.4 to /usr/local/lib/libcurl.so.4). See: http://curl.haxx.se/mail/tracker-2009-05/0014.html