在 Ubuntu 18.04 上安装 RVM 时出错

Posted

技术标签:

【中文标题】在 Ubuntu 18.04 上安装 RVM 时出错【英文标题】:Error while installing RVM on Ubuntu 18.04 【发布时间】:2018-12-27 23:54:54 【问题描述】:

我尝试在新版本的 Ubuntu 18.04 上安装 RVM。 但是我收到以下错误:

"Error running 'requirements_debian_libs_install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev',
please read /home/marko/.rvm/log/1545954319_ruby-2.5.3/package_install_gawk_g++_gcc_autoconf_automake_bison_libc6-dev_libffi-dev_libgdbm-dev_libncurses5-dev_libsqlite3-dev_libtool_libyaml-dev_make_pkg-config_sqlite3_zlib1g-dev_libgmp-dev_libreadline-dev_libssl-d.log
Requirements installation failed with status: 100."

我也找到了日志文件,其内容如下:

[2018-12-28 00:45:22] requirements_debian_libs_install
requirements_debian_libs_install () 
 
    __rvm_try_sudo apt-get --no-install-recommends --yes install "$@" || return $?

current path: /home/marko/.rvm/src/rvm
PATH=/home/marko/.nvm/versions/node/v11.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin
command(21): requirements_debian_libs_install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
++ /scripts/functions/requirements/debian : requirements_debian_libs_install()  36 > __rvm_try_sudo apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
++ /scripts/functions/utility : __rvm_try_sudo()  330 > typeset -a command_to_run
++ /scripts/functions/utility : __rvm_try_sudo()  331 > typeset sudo_path sbin_path missing_paths
++ /scripts/functions/utility : __rvm_try_sudo()  332 > command_to_run=("$@")
++ /scripts/functions/utility : __rvm_try_sudo()  333 > ((  UID == 0  ))
++ /scripts/functions/utility : __rvm_try_sudo()  334 > case "$rvm_autolibs_flag_number" in
++ /scripts/functions/utility : __rvm_try_sudo()  349 > is_a_function __rvm_sudo
++ /scripts/functions/support : is_a_function()  5 > typeset -f __rvm_sudo
++ /scripts/functions/utility : __rvm_try_sudo()  351 > missing_paths=
++ /scripts/functions/utility : __rvm_try_sudo()  352 > for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ -d /sbin ]]
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ :/home/marko/.nvm/versions/node/v11.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin: != *\:\/\s\b\i\n\:* ]]
++ /scripts/functions/utility : __rvm_try_sudo()  352 > for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ -d /usr/sbin ]]
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ :/home/marko/.nvm/versions/node/v11.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin: != *\:\/\u\s\r\/\s\b\i\n\:* ]]
++ /scripts/functions/utility : __rvm_try_sudo()  352 > for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ -d /usr/local/sbin ]]
++ /scripts/functions/utility : __rvm_try_sudo()  354 > [[ :/home/marko/.nvm/versions/node/v11.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin:/home/marko/.rvm/bin: != *\:\/\u\s\r\/\l\o\c\a\l\/\s\b\i\n\:* ]]
++ /scripts/functions/utility : __rvm_try_sudo()  358 > [[ -n '' ]]
++ /scripts/functions/utility : __rvm_try_sudo()  361 > command_to_run=(__rvm_sudo -p "%p password required for '$*': " "$command_to_run[@]")
++ /scripts/functions/utility : __rvm_try_sudo()  368 > __rvm_sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev'\'': ' apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
++ /scripts/functions/support : __rvm_sudo()  357 > command sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev'\'': ' apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
++ /scripts/functions/support : __rvm_sudo()  357 > sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev'\'': ' apt-get --no-install-recommends --yes install gawk g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 autoconf : Depends: m4 (>= 1.4.13)
 automake : Depends: autotools-dev (>= 20020320.1) but it is not going to be installed
 bison : Depends: m4
         Depends: libbison-dev (= 2:3.0.4.dfsg-1build1) but it is not going to be installed
 g++ : Depends: g++-7 (>= 7.3.0-27~) but it is not going to be installed
       Depends: gcc-7 (>= 7.3.0-27~) but it is not going to be installed
 gawk : PreDepends: libsigsegv2 (>= 2.9) but it is not going to be installed
 gcc : Depends: gcc-7 (>= 7.3.0-27~) but it is not going to be installed
 libc6-dev : Depends: libc-dev-bin (= 2.27-3ubuntu1)
             Depends: linux-libc-dev but it is not going to be installed
 libgmp-dev : Depends: libgmpxx4ldbl (= 2:6.1.2+dfsg-2) but it is not going to be installed
 libncurses5-dev : Depends: libtinfo-dev (= 6.1-1ubuntu1.18.04) but it is not going to be installed
 libreadline-dev : Depends: libtinfo-dev but it is not going to be installed
 libtool : Depends: autotools-dev but it is not going to be installed
 pkg-config : Depends: dpkg-dev but it is not going to be installed
 viber : Depends: libcurl3 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
++ /scripts/functions/utility : __rvm_try_sudo()  368 > return 100
++ /scripts/functions/requirements/debian : requirements_debian_libs_install()  36 > return 100

我尝试运行 apt --fix-broken install,但没有多大帮助。 此外,我查找了任何缺少的依赖项,但我自己找不到任何问题(我是一个新的 Ubuntu 用户)。

有谁知道这是什么类型的问题以及如何解决它?

干杯

【问题讨论】:

【参考方案1】:

我尝试了很多东西,但都没有奏效。 唯一有效的是 ruby​​ docker 容器。

【讨论】:

【参考方案2】:

在 [https://github.com/rvm/rvm1 找到解决方案 这可以关闭。

【讨论】:

链接失效...

以上是关于在 Ubuntu 18.04 上安装 RVM 时出错的主要内容,如果未能解决你的问题,请参考以下文章

ruby 版本管理器(安装 rvm 时出现以下内存错误)

无法在 ubuntu 12.04 上安装 rvm

Ubuntu 18.04 版本下安装ROS 系统

如何在没有 RVM 的 Ubuntu 上安装 Ruby 2

在 Ubuntu 14.04 上使用 RVM 安装 Ruby 2.2.2 时出错

(Mac 终端)尝试使用 RVM 安装最新的 ruby​​ 时出现“系统”消息