首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >升级后apt-get更新失败

升级后apt-get更新失败
EN

Ask Ubuntu用户
提问于 2013-08-17 08:50:53
回答 1查看 3.1K关注 0票数 2

我刚刚更新了我的Ubuntu从12到13做:

代码语言:javascript
复制
apt-get update
...
apt-get upgrade

下一次,我可能应该简单地使用:

代码语言:javascript
复制
apt-get dist-upgrade

我现在的版本是:

代码语言:javascript
复制
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 13.04
Release:    13.04
Codename:   raring

当我试图更新系统时,会给出错误:

代码语言:javascript
复制
apt-get update
E: Type ‘sudo’ is not known on line 64 in source list /etc/apt/sources.list
E: The list of sources could not be read.

所以我做了一次清洗:

代码语言:javascript
复制
ppa-purge -purge *
Updating packages lists
E: Type ‘sudo’ is not known on line 64 in source list /etc/apt/sources.list
E: The list of sources could not be read.
Warning:  apt-get update failed for some reason
PPA to be removed: * urge
Warning:  Could not find package list for PPA: * urge

去找消息来源:

代码语言:javascript
复制
cd /etc/apt
ls
apt.conf.d     sources.list.d            trustdb.gpg   trusted.gpg.d
preferences.d  sources.list.distUpgrade  trusted.gpg
sources.list   sources.list.save         trusted.gpg~

ls .*
.:
apt.conf.d     sources.list.d            trustdb.gpg   trusted.gpg.d
preferences.d  sources.list.distUpgrade  trusted.gpg
sources.list   sources.list.save         trusted.gpg~

..:
acpi                           logrotate.conf
adduser.conf                   logrotate.d
adjtime                        lsb-base
akonadi                        lsb-base-logging.sh
alternatives                   lsb-release
anacrontab                     ltrace.conf
apg.conf                       lvm
apm                            macfanctl.conf
apparmor                       magic
apparmor.d                     magic.mime
apport                         mailcap
apt                            mailcap.order
aptdaemon                      manpath.config
at.deny                        matchbox
at-spi2                        mime.types
avahi                          mke2fs.conf
bash.bashrc                    modprobe.d
bash_completion                modules
bash_completion.d              motd
bindresvport.blacklist         mtab
blkid.conf                     mtab.fuselock
blkid.tab                      mtools.conf
bluetooth                      mysql
brlapi.key                     nanorc
brltty                         netscsid.conf
brltty.conf                    network
ca-certificates                NetworkManager
ca-certificates.conf           networks
ca-certificates.conf.dpkg-old  newt
calendar                       nsswitch.conf
chatscripts                    obex-data-server
checkbox.d                     ODBCDataSources
colord.conf                    odbc.ini
compizconfig                   odbcinst.ini
ConsoleKit                     openal
console-setup                  openvpn
cracklib                       opt
cron.d                         os-release
cron.daily                     pam.conf
cron.hourly                    pam.d
cron.monthly                   papersize
crontab                        passwd
cron.weekly                    passwd-
crypttab                       pcmcia
cups                           perl
cupshelpers                    pkcs11
dbus-1                         pm
debconf.conf                   pnm2ppa.conf
debian_version                 polkit-1
default                        popularity-contest.conf
deluser.conf                   ppp
depmod.d                       printcap
dhcp                           profile
dhcp3                          profile.d
dictionaries-common            protocols
dkms                           pulse
dnsmasq.d                      purple
doc-base                       python
dpkg                           python2.7
drirc                          python3
emacs                          python3.2
environment                    python3.3
firefox                        qemu
fonts                          qemu-ifdown
foomatic                       qemu-ifup
foremost.conf                  rc0.d
fstab                          rc1.d
fstab.d                        rc2.d
fuse.conf                      rc3.d
gai.conf                       rc4.d
gconf                          rc5.d
gdb                            rc6.d
ghostscript                    rc.local
gimp                           rcS.d
gnome                          remote-login-service.conf
gnome-app-install              resolvconf
gnome-settings-daemon          resolv.conf
groff                          rmt
group                          rpc
group-                         rsyslog.conf
grub.d                         rsyslog.d
grub.d.bak                     samba
gshadow                        sane.d
gshadow-                       securetty
gtk-2.0                        security
gtk-3.0                        selinux
hdparm.conf                    sensors3.conf
host.conf                      sensors.d
hostname                       services
hosts                          sgml
hosts.allow                    shadow
hosts.deny                     shadow-
hp                             shells
icedtea-web                    signond.conf
ifplugd                        signon-ui
init                           skel
init.d                         snmp
initramfs-tools                speech-dispatcher
inputrc                        ssh
insserv                        ssl
insserv.conf                   subversion
insserv.conf.d                 sudoers
iproute2                       sudoers.d
issue                          sysctl.conf
issue.net                      sysctl.d
java-6-openjdk                 systemd
kbd                            terminfo
kde4                           thunderbird
kde4rc                         timezone
kernel                         ucf.conf
kernel-img.conf                udev
kerneloops.conf                udisks2
kernel-pkg.conf                ufw
ksysguarddrc                   updatedb.conf
kubuntu-default-settings       update-manager
kvm                            update-motd.d
ldap                           update-notifier
ld.so.cache                    UPower
ld.so.conf                     upstart-xsessions
ld.so.conf.d                   usb_modeswitch.conf
legal                          usb_modeswitch.d
libaudit.conf                  vim
libnl-3                        vtrgb
libpaper.d                     wgetrc
libreoffice                    wodim.conf
lightdm                        wpa_supplicant
lintianrc                      X11
locale.alias                   xdg
localtime                      xml
logcheck                       xul-ext
login.defs                     zsh_command_not_found    

正如建议的那样,下面是我的sources.list:

代码语言:javascript
复制
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ quantal main restricted

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

## Major bug fix updates produced after the final release of the
## distribution.
deb http://au.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ raring-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://au.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://au.archive.ubuntu.com/ubuntu/ raring universe
deb http://au.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://au.archive.ubuntu.com/ubuntu/ raring-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://au.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://au.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ raring-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://au.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security 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 quantal partner
# deb-src http://archive.canonical.com/ubuntu quantal partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main

## for ArgoUML
# deb http://archive.getdeb.net/ubuntu/ oneiric-getdeb apps # disabled on upgrade to raring
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner

# command line editor (nano)
sudo -e /etc/apt/sources.list

# graphical editor
gksu gedit /etc/apt/sources.list

有人能说明一下吗?在升级之前,这个问题并不存在。

我在mac迷你双靴上运行我的Ubuntu。它用于软件开发和客户端-服务器的使用。另一台机器,一台运行薄荷的笔记本电脑,我试着升级它,但是Mint不允许您在没有干净安装的情况下,从一个发行版升级到下一个版本。我们还尝试了一些其他*尼克斯口味的测试: FreeBSD,OpenBSD,CentOS,Fedora.并且得出的结论是,Ubuntu看起来是实际企业环境的最佳选择,它为大量的驱动程序提供了很好的支持,并且在rEFIt/rEFInd或Grub多重引导方面也很好地工作。

我应该永远不要升级从当前发行版到下一个版本吗?除非是Ubuntu?那么,是否每一个新的Ubuntu发行版都需要一个干净的新安装呢?

所有的意见和建议将受到高度赞赏。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2013-08-18 02:39:02

如图所示,/etc/apt/ should . last中的最后5行不应该出现:

代码语言:javascript
复制
# command line editor (nano)
sudo -e /etc/apt/sources.list

# graphical editor
gksu gedit /etc/apt/sources.list

这是你的问题还是文件上的错误?

默认的13.04 (raring) /etc/apt/sources.list .with文件以:

代码语言:javascript
复制
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main

然后您有4行与ArgoUML相关的内容。

票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/333676

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档