【问题标题】:curl: (18) transfer closed with 804285 bytes remaining to readcurl:(18)传输关闭,剩余 804285 个字节要读取
【发布时间】:2013-07-19 07:54:17
【问题描述】:

当我尝试使用命令安装 rvm 时::(我正在使用 UBUNTU 12.04 LTS)

curl -L https://get.rvm.io | bash -s

当我尝试与简单用户相同的命令时,我收到类似的错误

abhay@Abhay:~/Downloads$ curl -L https://get.rvm.io |sudo bash -s
curl: (1) Protocol https not supported or disabled in libcurl

这是我的 curl 安装的两个路径

abhay@Abhay:~$ which -a curl
/home/abhay/bin/curl
/usr/local/bin/curl

这是我仍然遇到的错误

root@Abhay:/home/abhay# curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0     33      0  0:00:05  0:00:05 --:--:--    61
100 13774  100 13774    0     0   1271      0  0:00:10  0:00:10 --:--:--  3214
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   124  100   124    0     0     37      0  0:00:03  0:00:03 --:--:--    60
 27 1079k   27  294k    0     0   5853      0  0:03:08  0:00:51  0:02:17  8245
curl: (18) transfer closed with 804285 bytes remaining to read

Could not download 'https://github.com/wayneeseguin/rvm/archive/stable.tar.gz'.
  curl returned status '18'.

还有这个

root@Abhay:/home/abhay# \curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0     42      0  0:00:04  0:00:04 --:--:--    70
100 13774  100 13774    0     0   1663      0  0:00:08  0:00:08 --:--:--  4770
Turning on auto dotfiles mode.
Please read and follow further instructions.
Press ENTER to continue.
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   124  100   124    0     0     42      0  0:00:02  0:00:02 --:--:--    75
  8 1079k    8 98109    0     0   3745      0  0:04:55  0:00:26  0:04:29  7132

Curl returned 141 - it is result of a segfault which means it's Curls fault.
Try again and if it crashes more than a couple of times you either need to
reinstall Curl or consult with your distribution manual and contact support.

【问题讨论】:

  • 这是你应该做的:在serverFault重新发布你的问题
  • 看起来您安装了两个不同版本的 curl。要找出他们的住所,请在两个帐户(root 用户和简单用户)下使用which curl。然后,您可以删除其中一个或协调两个帐户的 PATH 变量,以便它们使用相同的 curl。
  • @MikeW : 对我来说更像是一个SuperUser 问题,我不确定。
  • @MiklosAubert 是的,我知道这两个版本都驻留在哪个目录中,甚至我也尝试删除 curl 但它对我不起作用(apt-get remove --purge curl)..在此命令之后我仍然可以看到安装在我的系统中的 curl 版本,
  • @MiklosAubert 那么在这之后我该怎么办?

标签: ubuntu curl installation rvm


【解决方案1】:

您的系统似乎坏了,RVM 在构建二进制 rubies 和 http://travis-ci.org 时都在 ubuntu 上进行了安装测试

我建议您删除此系统并开始全新安装而不进行任何自定义。

【讨论】:

  • 好的..我也会尝试这种方式..谢谢先生
  • 我忘了接受这个建议作为答案。相信我在此之后我重新安装并砰!..一切正常..非常感谢..还有一件事你正在做伟大的工作“rvm”。谢谢。
【解决方案2】:

从 PATH 中删除 /home/abhay/bin/curl

function remove_from_path()
{
  if
    [[ -n "$1" ]]
  then
    export PATH
    PATH=":${PATH}:"
    PATH="${PATH//:$1:/:}"
    PATH="${PATH//::/:}"
    PATH="${PATH#:}"
    PATH="${PATH%:}"
  fi
}
remove_from_path /home/abhay/bin

【讨论】:

  • 好的,如果我错了,请纠正我..这是来自 env 的 PATH。你要我删除变量?我已从 ~/.profile 中删除它是否正确? ..接下来我该怎么办?
  • 我已经从 PATH 中删除了 /home/abhay/bin/curl。现在我应该再次尝试使用 curl 命令安装吗?
  • 抱歉这么愚蠢的问题,但我想在此之后您可能还想让我做其他事情......这就是我问你的原因。完成后我会告诉你..提前谢谢你。
  • 请看这个..这是我再次尝试时得到的结果..我在原始帖子的底部发布了错误** curl:(18)传输关闭,剩余 804285 字节阅读**
猜你喜欢
  • 2014-08-22
  • 1970-01-01
  • 1970-01-01
  • 2010-12-18
  • 1970-01-01
  • 1970-01-01
  • 2020-07-07
  • 2021-04-09
  • 2021-04-21
相关资源
最近更新 更多