安装 ruby-2.7.1 时遇到问题

Facing issue while installing ruby-2.7.1

我在安装最新的 ruby 版本 2.7.1

时遇到问题

当我尝试 运行 命令时 rvm install 2.7.1

Warning, new version of rvm available '1.29.10', you are using older version '1.29.9'.
You can disable this warning with:   echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with:     echo rvm_autoupdate_flag=2 >> ~/.rvmrc
You can update manually with:        rvm get VERSION                         (e.g. 'rvm get stable')

Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/18.04/x86_64/ruby-2.7.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system........There has been an error while updating your system using `apt-get`.
It seems that there are some 404 Not Found errors for repositories listed in:

.    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list
\
Make sure that all repositories are available from your system and verify your setup by running manually:

    sudo apt-get update
-
Make sure that it works correctly before proceeding with RVM.
|
If you are working from the GUI instead of the terminal, you might want to verify and fix broken
repositories using "Software & Updates" application.
.
.
Error running 'requirements_debian_update_system ruby-2.7.1',
please read /home/anikettiwari/.rvm/log/1592545564_ruby-2.7.1/update_system.log
Requirements installation failed with status: 100.

当我尝试 运行 sudo apt-get update 时。也没有用

Hit:1 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu bionic InRelease                                                                    
Hit:2 https://dl.yarnpkg.com/debian stable InRelease                                                                                         
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic InRelease                                                                                   
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                           
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                         
Hit:6 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                 
Hit:7 http://ppa.launchpad.net/peek-developers/stable/ubuntu bionic InRelease                                                                
Hit:8 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                            
Ign:9 http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic InRelease                                                                      
Hit:10 https://download.sublimetext.com apt/stable/ InRelease                                                                                
Hit:11 https://deb.nodesource.com/node_12.x bionic InRelease                                                                                 
Hit:12 https://dbeaver.io/debs/dbeaver-ce  InRelease                                                                                         
Hit:13 http://ppa.launchpad.net/videolan/master-daily/ubuntu bionic InRelease                                                                
Hit:14 https://download.docker.com/linux/ubuntu bionic InRelease                                                                  
Hit:15 https://repo.skype.com/deb stable InRelease                                                            
Err:16 http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic Release    
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists... Done                       
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'
E: The repository 'http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4

我尝试检查提到的日志

cat /home/anikettiwari/.rvm/log/1592547152_ruby-2.7.1/update_system.log


[2020-06-19 11:42:32] requirements_debian_update_system
requirements_debian_update_system () 
{ 
    __rvm_try_sudo apt-get --quiet --yes update || { 
        \typeset __ret=$?;
        case ${__ret} in 
            100)
                rvm_error "There has been an error while updating your system using \`apt-get\`.
It seems that there are some 404 Not Found errors for repositories listed in:

    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list

Make sure that all repositories are available from your system and verify your setup by running manually:

    sudo apt-get update

Make sure that it works correctly before proceeding with RVM.

If you are working from the GUI instead of the terminal, you might want to verify and fix broken
repositories using \"Software & Updates\" application.
"
            ;;
        esac;
        return ${__ret}
    }
}
current path: /home/anikettiwari/Desktop
GEM_HOME=/home/anikettiwari/.rvm/gems/ruby-2.5.3
GEM_PATH=/home/anikettiwari/.rvm/gems/ruby-2.5.3:/home/anikettiwari/.rvm/gems/ruby-2.5.3@global
PATH=/home/anikettiwari/.rvm/gems/ruby-2.5.3/bin:/home/anikettiwari/.rvm/gems/ruby-2.5.3@global/bin:/home/anikettiwari/.rvm/rubies/ruby-2.5.3/bin:/home/anikettiwari/.rvm/bin:/home/anikettiwari/anaconda3/condabin:/home/anikettiwari/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
command(2): requirements_debian_update_system ruby-2.7.1
++ __rvm_try_sudo apt-get --quiet --yes update
++ typeset -a command_to_run
++ typeset sudo_path sbin_path missing_paths
++ command_to_run=("$@")
++ ((  UID == 0  ))
++ case "$rvm_autolibs_flag_number" in
++ is_a_function __rvm_sudo
++ typeset -f __rvm_sudo
++ missing_paths=
++ for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ [[ -d /sbin ]]
++ [[ :/home/anikettiwari/.rvm/gems/ruby-2.5.3/bin:/home/anikettiwari/.rvm/gems/ruby-2.5.3@global/bin:/home/anikettiwari/.rvm/rubies/ruby-2.5.3/bin:/home/anikettiwari/.rvm/bin:/home/anikettiwari/anaconda3/condabin:/home/anikettiwari/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: != *\:\/\s\b\i\n\:* ]]
++ for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ [[ -d /usr/sbin ]]
++ [[ :/home/anikettiwari/.rvm/gems/ruby-2.5.3/bin:/home/anikettiwari/.rvm/gems/ruby-2.5.3@global/bin:/home/anikettiwari/.rvm/rubies/ruby-2.5.3/bin:/home/anikettiwari/.rvm/bin:/home/anikettiwari/anaconda3/condabin:/home/anikettiwari/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: != *\:\/\u\s\r\/\s\b\i\n\:* ]]
++ for sbin_path in /sbin /usr/sbin /usr/local/sbin
++ [[ -d /usr/local/sbin ]]
++ [[ :/home/anikettiwari/.rvm/gems/ruby-2.5.3/bin:/home/anikettiwari/.rvm/gems/ruby-2.5.3@global/bin:/home/anikettiwari/.rvm/rubies/ruby-2.5.3/bin:/home/anikettiwari/.rvm/bin:/home/anikettiwari/anaconda3/condabin:/home/anikettiwari/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: != *\:\/\u\s\r\/\l\o\c\a\l\/\s\b\i\n\:* ]]
++ [[ -n '' ]]
++ command_to_run=(__rvm_sudo -p "%p password required for '$*': " "${command_to_run[@]}")
++ __rvm_sudo -p '%p password required for '\''apt-get --quiet --yes update'\'': ' apt-get --quiet --yes update
++ command sudo -p '%p password required for '\''apt-get --quiet --yes update'\'': ' apt-get --quiet --yes update
++ sudo -p '%p password required for '\''apt-get --quiet --yes update'\'': ' apt-get --quiet --yes update
Hit:1 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 https://dl.yarnpkg.com/debian stable InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 http://ppa.launchpad.net/peek-developers/stable/ubuntu bionic InRelease
Ign:9 http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic InRelease
Hit:10 https://download.sublimetext.com apt/stable/ InRelease
Hit:11 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:12 http://ppa.launchpad.net/videolan/master-daily/ubuntu bionic InRelease
Hit:13 https://deb.nodesource.com/node_12.x bionic InRelease
Hit:14 https://repo.skype.com/deb stable InRelease
Hit:15 https://dbeaver.io/debs/dbeaver-ce  InRelease
Err:16 http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic Release
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists...
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
E: The repository 'http://ppa.launchpad.net/sethj/silentcast/ubuntu bionic Release' does not have a Release file.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4
++ return 100
++ typeset __ret=100
++ case ${__ret} in
++ rvm_error 'There has been an error while updating your system using `apt-get`.
It seems that there are some 404 Not Found errors for repositories listed in:

    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list

Make sure that all repositories are available from your system and verify your setup by running manually:

    sudo apt-get update

Make sure that it works correctly before proceeding with RVM.

If you are working from the GUI instead of the terminal, you might want to verify and fix broken
repositories using "Software & Updates" application.
'
++ rvm_pretty_print stderr
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ case "" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been an error while updating your system using `apt-get`.
It seems that there are some 404 Not Found errors for repositories listed in:

    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list

Make sure that all repositories are available from your system and verify your setup by running manually:

    sudo apt-get update

Make sure that it works correctly before proceeding with RVM.

If you are working from the GUI instead of the terminal, you might want to verify and fix broken
repositories using "Software & Updates" application.
\n'
++ return 100

我现在有点困惑需要做什么才能解决这个问题

问题是:ppa:sethj/silentcast

此 PPA 与 Ubuntu 18.04(仿生)不兼容。

删除它运行:

$ sudo add-apt-repository --remove ppa:sethj/silentcast

此外,您可能会发现本指南很有用:Best GIF Recorder Tools for Linux

下面的代码适合我

$ rvm autolibs homebrew
rvm autolibs read-only

for ubuntu 18.04 使用上面的代码。

我在安装 ruby 的不同版本时遇到了类似的错误 2.3.4

我得到的建议是 运行 按照命令修复它

sudo apt-get update

但这没有用,我开始遇到问题

为了解决这个问题,我对列表中导致问题的行进行了评论

命令格式如下 sudo nano path/*.list

sudo nano /etc/apt/sources.list.d/*.list

它会一个一个打开所有文件,然后注释行并保存列表

<pre>Err:12 http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu bionic Release </pre>

保存文件后,当我 运行 再次更新命令时,它就像一个魅力

下面的代码适合我

rvm autolibs homebrew rvm autolibs read-only