-1

我正在尝试运行 rvm 要求,因此我可以稍后安装 rails 但我收到了消息

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

.    sudo apt-get update
"

因此,我运行了 sudo apt-get update 并收到以下消息,我不知道该怎么办。

$ sudo apt-get update
Hit:2 http://packages.elementary.io/appcenter xenial InRelease                                 
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                     
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                    
Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                                   
Ign:1 http://toolbelt.heroku.com/ubuntu ./ InRelease                                           
Ign:6 http://archive.ubuntu.com/ubuntu loki InRelease                                          
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                  
Hit:8 http://dl.google.com/linux/chrome/deb stable Release                                     
Hit:10 http://ppa.launchpad.net/allegro/5.2/ubuntu xenial InRelease                            
Get:11 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]                    
Hit:9 http://toolbelt.heroku.com/ubuntu ./ Release                                             
Hit:12 https://download.sublimetext.com apt/stable/ InRelease                                  
Ign:13 http://archive.ubuntu.com/ubuntu loki Release                                           
Hit:14 https://deb.nodesource.com/node_8.x xenial InRelease                                    
Hit:15 https://dl.yarnpkg.com/debian stable InRelease                                          
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages                           
Hit:17 https://dl.winehq.org/wine-builds/ubuntu xenial InRelease                               
Hit:18 http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial InRelease                   
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages                            
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages                             
Hit:23 http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial InRelease
Hit:24 https://s3-us-west-2.amazonaws.com/brave-apt xenial InRelease                           
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US                        
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en                           
Hit:27 http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial InRelease
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata                    
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons                       
Hit:30 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial InRelease     
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages                           
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages                            
Hit:31 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages                             
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US                        
Hit:32 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease 
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en                           
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata                    
Hit:33 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Err:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
  404  Not Found [IP: 91.189.88.152 80]
Ign:20 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:21 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:25 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:28 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Fetched 306 kB in 3s (77.3 kB/s)
Reading package lists... Done
W: The repository 'http://archive.ubuntu.com/ubuntu loki Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/loki/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

谁能告诉我如何处理我上面收到的消息找不到这个 404?

这是我运行时发生的情况cat /home/mohammad/.rvm/log/1516253504/update_system.log

~$ cat /home/mohammad/.rvm/log/1516253504/update_system.log

[2018-01-18 00:31:44] 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/mohammad
PATH=/home/mohammad/.linuxbrew/bin:/home/mohammad/bin:/home/mohammad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/mohammad/.rvm/bin
command(2): requirements_debian_update_system 
+ __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/mohammad/.linuxbrew/bin:/home/mohammad/bin:/home/mohammad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/mohammad/.rvm/bin: != *\:\/\s\b\i\n\:* ]]
+ for sbin_path in /sbin /usr/sbin /usr/local/sbin
+ [[ -d /usr/sbin ]]
+ [[ :/home/mohammad/.linuxbrew/bin:/home/mohammad/bin:/home/mohammad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/mohammad/.rvm/bin: != *\:\/\u\s\r\/\s\b\i\n\:* ]]
+ for sbin_path in /sbin /usr/sbin /usr/local/sbin
+ [[ -d /usr/local/sbin ]]
+ [[ :/home/mohammad/.linuxbrew/bin:/home/mohammad/bin:/home/mohammad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/mohammad/.rvm/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://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Hit:4 http://packages.elementary.io/appcenter xenial InRelease
Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Ign:7 http://archive.ubuntu.com/ubuntu loki InRelease
Hit:8 http://ppa.launchpad.net/allegro/5.2/ubuntu xenial InRelease
Hit:9 http://dl.google.com/linux/chrome/deb stable Release
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Hit:11 https://download.sublimetext.com apt/stable/ InRelease
Ign:12 http://archive.ubuntu.com/ubuntu loki Release
Hit:13 https://deb.nodesource.com/node_8.x xenial InRelease
Hit:15 http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial InRelease
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Hit:17 https://dl.yarnpkg.com/debian stable InRelease
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Hit:19 https://s3-us-west-2.amazonaws.com/brave-apt xenial InRelease
Ign:2 http://toolbelt.heroku.com/ubuntu ./ InRelease
Hit:21 http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial InRelease
Hit:20 http://toolbelt.heroku.com/ubuntu ./ Release
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Hit:24 http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial InRelease
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Hit:28 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial InRelease
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Hit:30 https://dl.winehq.org/wine-builds/ubuntu xenial InRelease
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Hit:31 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Hit:32 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Hit:33 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Ign:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Err:16 http://archive.ubuntu.com/ubuntu loki/universe amd64 Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:18 http://archive.ubuntu.com/ubuntu loki/universe i386 Packages
Ign:22 http://archive.ubuntu.com/ubuntu loki/universe all Packages
Ign:23 http://archive.ubuntu.com/ubuntu loki/universe Translation-en_US
Ign:26 http://archive.ubuntu.com/ubuntu loki/universe Translation-en
Ign:27 http://archive.ubuntu.com/ubuntu loki/universe amd64 DEP-11 Metadata
Ign:29 http://archive.ubuntu.com/ubuntu loki/universe DEP-11 64x64 Icons
Fetched 306 kB in 4s (64.7 kB/s)
Reading package lists...
W: The repository 'http://archive.ubuntu.com/ubuntu loki Release' does not have a Release file.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/loki/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.88.149 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
+ 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 "$1" in
+ [[ -t 2 ]]
+ return 1
+ rvm_printf_to_stderr %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'
+ 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

不确定这是否相关,但我也在使用elementaryOS

编辑:

这是我的 /etc/apt/sources.list 文件:

# deb cdrom:[elementary OS 0.4.1 _Loki_ - Stable amd64 (20170814)]/ xenial contrib main non-free

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ xenial main
deb http://archive.ubuntu.com/ubuntu loki universe
# deb-src http://archive.ubuntu.com/ubuntu loki universe
4

2 回答 2

2

请按照以下步骤操作

  1. 打开/etc/apt/sources.list和删除deb http://archive.ubuntu.com/ubuntu loki universe线
  2. sudo apt-get update.

参考:https ://elementaryos.stackexchange.com/a/7830

于 2018-01-18T05:44:17.247 回答
0

我有确切的问题并解决如下:在shell中运行此代码:

cd /etc/apt/
vim sources.list

当 vim 打开按 i 插入时,转到最后一行并添加此行:

deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

按“Esc”,输入 ->:w !sudo tee % 按回车键。cat source.list 通过运行更新命令检查 ti 是否工作

于 2018-11-26T23:24:41.630 回答