Ubuntu 18.04 更新问题

Ubuntu 18.04 更新问题

我正在使用 Ubuntu 18.04。运行时出现以下更新问题sudo apt updatesudo apt upgrade

Hit:14 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease      
Fetched 83.2 kB in 4s (23.0 kB/s)                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

结果sudo apt list --upgradable

Listing... Done
nodejs/bionic-updates 8.10.0~dfsg-2ubuntu0.3 amd64 [upgradable from: 8.10.0~dfsg-2ubuntu0.2]
nodejs-dev/bionic-updates 8.10.0~dfsg-2ubuntu0.3 amd64 [upgradable from: 8.10.0~dfsg-2ubuntu0.2]

结果sudo apt upgrade

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libasan3-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libasan4-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libasan4-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libatomic1-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libatomic1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libc6-armel-armhf-cross : Depends: libc6-armel-cross but it is not installed
 libc6-armhf-armel-cross : Depends: libc6-armhf-cross but it is not installed
 libc6-dev-armel-armhf-cross : Depends: libc6-dev-armel-cross but it is not installed
 libcilkrts5-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libcilkrts5-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libgcc1-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libgcc1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libgomp1-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libgomp1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfasan4-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfatomic1-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfcilkrts5-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfgomp1-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfstdc++6-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libhfubsan0-armel-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libsfasan4-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libsfatomic1-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libsfcilkrts5-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libsfgomp1-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libsfstdc++6-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libsfubsan0-armhf-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libstdc++6-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libstdc++6-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
 libubsan0-armel-cross : Depends: libc6-armel-cross (>= 2.27) but it is not installed
 libubsan0-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

结果sudo apt --fix-broken install

正在读取软件包列表...完成
构建依赖关系树       
正在读取状态信息...完成
纠正依赖关系...完成
以下软件包已自动安装并且不再需要:
  cpp-7-arm-linux-gnueabi cpp-arm-linux-gnueabi gcc-7-arm-linux-gnueabi gcc-7-arm-linux-gnueabi-base gcc-arm-linux-gnueabi libasan4-armel-cross libatomic1-armel-cross libc6-armhf-armel-cross libcilkrts5-armel-cross
  libgcc-7-dev-armel-cross libhfasan4-armel-cross libhfatomic1-armel-cross libhfcilkrts5-armel-cross libhfgcc-7-dev-armel-cross libhfgcc1-armel-cross libhfgomp1-armel-cross libhfstdc++6-armel-cross
  libhfubsan0-armel-cross libstdc++6-armel-cross libubsan0-armel-cross
使用“sudo apt autoremove”来删除它们。
将会安装以下附加软件包:
  libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross
将会安装以下新软件包:
  libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross
升级了 0 个,新安装了 3 个,删除了 0 个,并且未升级 2 个。
需要获取 0 B/3,972 kB 的档案。
此操作后将使用0B的额外磁盘空间。
您想继续吗?[Y/n]
(正在读取数据库...当前安装了 424757 个文件和目录。)
准备解压 .../libc6-armel-cross_2.27-3ubuntu1cross1.1_all.deb ...
正在解压 libc6-armel-cross (2.27-3ubuntu1cross1.1) ...
dpkg: 处理档案 /var/cache/apt/archives/libc6-armel-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack) 时出错:
 无法打开‘/usr/arm-linux-gnueabi/lib/ld-2.27.so.dpkg-new’:没有此文件或目录
未编写任何 apport 报告,因为错误消息表明本地系统存在问题
                                                                                         准备解压 .../libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
正在解压 libc6-armhf-cross (2.27-3ubuntu1cross1.1) ...
dpkg: 处理档案 /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack) 时出错:
 无法打开‘/usr/arm-linux-gnueabihf/lib/ld-2.27.so.dpkg-new’:没有此文件或目录
未编写任何 apport 报告,因为错误消息表明本地系统存在问题
                                                                                         准备解压 .../libc6-dev-armel-cross_2.27-3ubuntu1cross1.1_all.deb ...
正在解压 libc6-dev-armel-cross (2.27-3ubuntu1cross1.1) ...
dpkg: 处理档案 /var/cache/apt/archives/libc6-dev-armel-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack) 时出错:
 无法打开‘/usr/arm-linux-gnueabi/lib/Mcrt1.o.dpkg-new’:没有此文件或目录
未编写任何 apport 报告,因为错误消息表明本地系统存在问题
                                                                                         处理时遇到错误:
 /var/cache/apt/archives/libc6-armel-cross_2.27-3ubuntu1cross1.1_all.deb
 /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
 /var/cache/apt/archives/libc6-dev-armel-cross_2.27-3ubuntu1cross1.1_all.deb
E: 子进程 /usr/bin/dpkg 返回错误代码 (1)

答案1

遇到了同样的问题Mcrt1.o.dpkg-新唯一可行的解​​决方案是同时删除所有存在依赖问题的软件包。在我的例子中,列表如下:

apt remove libc6-dev-armel-cross libstdc++-7-dev-armel-cross libstdc++-5-dev-armel-cross g++-5-arm-linux-gnueabi  g++-7-arm-linux-gnueabi g++-arm-linux-gnueabi libasan2-armel-cross  libasan4-armel-cross libatomic1-armel-cross libcilkrts5-armel-cross libgcc1-armel-cross libgomp1-armel-cross libstdc++6-armel-cross libubsan0-armel-cross libgcc-5-dev-armel-cross libgcc-7-dev-armel-cross gcc-5-arm-linux-gnueabi gcc-7-arm-linux-gnueabi  gcc-arm-linux-gnueabi

相关内容