【问题标题】:RVM Install on Linux Mint error (23) - Permissions Issue?RVM 在 Linux Mint 上安装错误 (23) - 权限问题?
【发布时间】:2018-04-20 18:27:28
【问题描述】:

我正在尝试在 Linux Mint 上使用 RVM 安装 ruby​​,但遇到了各种问题。主要是:

{14:20}={bit@pimpinix:~}=> rvm install 2.4.1
sudo: [[: command not found
sudo: [[: command not found
sudo: [[: command not found
sudo: [[: command not found
sudo: __function_on_stack: command not found
sudo: [[: command not found
sudo: [[: command not found
sudo: [[: command not found
sudo: [[: command not found
sudo: [[: command not found
Searching for binary rubies, this might take some time.
sudo: __rvm_remote_server_path_single: command not found
sudo: __rvm_remote_server_path_single: command not found
No binary rubies available for: mint/18.3/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more 
information on binary rubies.
Checking requirements for mint.
Requirements installation successful.
sudo: [[: command not found
sudo: [[: command not found
Installing Ruby from source to: /usr/share/rvm/rubies/ruby-2.4.1, this 
may take a while depending on your cpu(s)...
sudo: [[: command not found
sudo: [[: command not found
ruby-2.4.1 - #downloading ruby-2.4.1, this may take a while depending 
on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  
Current
                             Dload  Upload   Total   Spent    Left  
Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:- 
   -:--     0Warning: Failed to create the file ruby-2.4.1.tar.bz2.part: 
Permission denied
  0 11.9M    0  2759    0     0   7343      0  0:28:32 --:--:--  
0:28:32  7337
curl: (23) Failed writing body (0 != 2759)
There was an error(23).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.4/ruby- 
2.4.1.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  
Current
                             Dload  Upload   Total   Spent    Left  
Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:- 
   -:--     0Warning: Failed to create the file ruby-2.4.1.tar.bz2.part: 
 Permission denied
  0 11.9M    0 16149    0     0   9556      0  0:21:55  0:00:01  
0:21:54  9555
curl: (23) Failed writing body (0 != 16149)
There was an error(23).
Failed download
There has been an error fetching the ruby interpreter. Halting the 
installation.

这一直是我最近安装的所有 ubuntu 风格的 linux 的一个问题……除了这个更糟。请帮忙!?

【问题讨论】:

    标签: bash rvm linux-mint


    【解决方案1】:

    在某个地方,我怀疑正在运行这样的事情:

    sudo [[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
    

    来自this question

    你不能运行sudo [[,因为 sudo 不是 bash。 bash 可以解释条件语法,而 sudo 需要一个命令。但是,可以运行sudo bash -c "[[ -s '/usr/local/rvm/scripts/rvm' ]] && source '/usr/local/rvm/scripts/rvm'",以便 bash 负责 bashism,并且 sudo 有一个命令可以运行。请注意,在这种特定情况下,使用 bash -c 作为包装器可能无法达到您想要的效果,具体取决于 /usr/local/rvm/scripts/rvm 正在做什么。因此,您可能需要找到另一种解决方法。

    我会尝试找出sudo [[ 发生的位置,并进行我描述的更改。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-29
      • 2014-03-03
      • 2020-05-31
      • 2017-08-05
      • 2014-12-09
      • 2011-11-28
      • 1970-01-01
      相关资源
      最近更新 更多