我正在尝试按照以下步骤进行升级:
- 通过终端更新系统(“sudo apt-get update && sudo apt-get dist-upgrade”)
- 运行“sudo update-manager -d”(我希望更新管理器能够打开并告诉您:新发行版‘13.04’已发布)
但是当我从终端执行第一步时,发生了以下情况:
>Fetched 489 kB in 49s (9,954 B/s)
>Reading package lists... Done
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>You might want to run 'apt-get -f install' to correct these.
>The following packages have unmet dependencies:
>libc6 : Depends: libgcc1 but it is not installed
> Depends: tzdata but it is not installed
>E: Unmet dependencies. Try using -f.
但是当我尝试运行“apt-get -f install”时,我得到了:
>E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
>
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
我将非常感谢您的建议,谢谢。
哦...我忘了说我也尝试过...结果是:
> michael@ubuntu:~$ sudo apt-get -f install
> [sudo] password for michael:
> Reading package lists... Done Building dependency tree
> Reading state information... Done Correcting dependencies...
> Done The following extra packages will be installed: apt-utils debconf
> debconf-i18n dpkg gcc-4.7-base libapt-inst1.5 libapt-pkg4.12
> libbz2-1.0 libc6 libdb5.1 libgcc1 liblocale-gettext-perl liblzma5
> libselinux1 libstdc++6 libtext-charwidth-perl libtext-iconv-perl
> libtext-wrapi18n-perl perl-base tar zlib1g
> Suggested packages: xz-utils debconf-doc debconf-utils whiptail dialog gnome-utils
> libterm-readline-gnu-perl libgtk2-perl libnet-ldap-perl libqtgui4-perl
> libqtcore4-perl apt glibc-doc locales bzip2 ncompress
> The following NEW packages will be installed: apt-utils debconf debconf-i18n dpkg
> libapt-inst1.5 libapt-pkg4.12 libbz2-1.0 libdb5.1 libgcc1
> liblocale-gettext-perl liblzma5 libselinux1 libstdc++6
> libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl
> perl-base tar zlib1g
> The following packages will be upgraded:
> gcc-4.7-base libc6 2 upgraded, 19 newly installed, 0 to remove and 1
> not upgraded. 2 not fully installed or removed. Need to get 0 B/11.3
> MB of archives. After this operation, 22.3 MB of additional disk space
> will be used. Do you want to continue [Y/n]?
> y
> debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend requires a
> screen at least 13 lines tall and 31 columns wide.) debconf: falling
> back to frontend: Readline
> E: Cannot get debconf version. Is debconf installed? debconf: apt-extracttemplates failed: (Reading database... 479 files and directories currently installed.) Preparing to replace libc6:amd64 2.15-0ubuntu20.1 (using .../libc6_2.17-0ubuntu5_amd64.deb) ...
debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.) debconf: falling back to frontend:
> Readline Checking for services that may need to be restarted...
> Checking init scripts... Checking for services that may need to be
> restarted... Checking init scripts... Nothing to restart. dpkg: error
> processing /var/cache/apt/archives/libc6_2.17-0ubuntu5_amd64.deb
> (--unpack): subprocess new pre-installation script returned error
> exit status 2 dpkg: regarding .../libbz2-1.0_1.0.6-4_amd64.deb
> containing libbz2-1.0:amd64, pre-dependency problem: libbz2-1.0
> pre-depends on multiarch-support multiarch-support is unpacked, but
> has never been configured.
>
> dpkg: error processing
> /var/cache/apt/archives/libbz2-1.0_1.0.6-4_amd64.deb (--unpack):
> pre-dependency problem - not installing libbz2-1.0:amd64 Errors were
> encountered while processing:
> /var/cache/apt/archives/libc6_2.17-0ubuntu5_amd64.deb
> /var/cache/apt/archives/libbz2-1.0_1.0.6-4_amd64.deb
> E: Sub-process
> /usr/bin/dpkg returned an error code (1)
答案1
前置sudo
在您的最后一个命令中,sudo
按照错误消息的建议,添加提升权限的前缀。因此,运行:
sudo apt-get -f install
不管怎样,您的消息是关于目前未安装大量基础软件包... 在我看来,tzdata
未安装的软件包非常可疑。这将导致所有与时区相关的操作失败。因此,我怀疑您的系统上还有更多问题,但请尝试一下。