我已经在机器上安装了rvm。我想安装ruby-2.6.2,但rvm install 2.6.2
显示以下错误请帮我修复这个
xx@LAPTOP-U5HPCQ9V:~$ rvm -v
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
xx@LAPTOP-U5HPCQ9V:~$ rvm install 2.6.2
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.6.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system...
Installing required packages: libgmp-dev, libssl-dev....
Error running 'requirements_debian_libs_install libgmp-dev libssl-dev',
please read /usr/share/rvm/log/1634551925_ruby-2.6.6/package_install_libgmp-dev_libssl-dev.log
Requirements installation failed with status: 100.
sudo nano /etc/apt/sources.list
- 将这些行添加到
sources.list
文件
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse deb http://archive.canonical.com/ubuntu focal partner deb-src http://archive.canonical.com/ubuntu focal partner
sudo apt update
sudo apt install libssl1.0-dev
rvm install 2.6.2