dpkg: error processing archive /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1

需要参考下面的方法:
https://blog.csdn.net/qq_25862847/article/details/79229349
https://blog.csdn.net/zhouzhiyao960211/article/details/89716036
https://askubuntu.com/questions/1083832/ubuntu-18-04-update-issue
https://blog.csdn.net/minicto/article/details/62240020

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libc6-armhf-cross libc6-dev-armhf-cross
The following packages will be upgraded:
  libc6-armhf-cross libc6-dev-armhf-cross
2 upgraded, 0 newly installed, 0 to remove and 259 not upgraded.
10 not fully installed or removed.
Need to get 0 B/2,904 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 256876 files and directories currently installed.)
Preparing to unpack .../libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) over (2.23-0ubuntu3cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/Mcrt1.o.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Preparing to unpack .../libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-armhf-cross (2.27-3ubuntu1cross1.1) over (2.23-0ubuntu3cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/ld-2.27.so.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
 /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方法1:

apt --fix-broken install
apt-get update
apt-get upgrade

如果上面的方法不起作用,还可以尝试第二种方法:

解决方法二

可以参考链接:

https://blog.csdn.net/zhouzhiyao960211/article/details/89716036

1,首先先执行apt --fix-broken install
2,如果这一步和上面的链接提示的问题一样,那就再执行
sudo dpkg -i --force-overwrite [文件名]
如这行错误所示:

Unpacking libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) over (2.23-0ubuntu3cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/Mcrt1.o.dpkg-new': No such file or directory

需要执行下面的命令:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
3,再重复步骤#1,执行一遍sudo apt --fix-broken install
4,如果还是不行的话,那就先去卸载,再去安装。
sudo dpkg -P [文件]
sudo dpkg -i [软件包]

解决方法三

我在尝试了上面的这些方法之后还是不可以,因为我之前的时候变更过软件的源,后来我干脆就直接把软件以及系统的源设置为阿里云。
1,执行-f dist-upgrade
2,执行apt --fix-broken install
3,再执行apt-get update
4,最后执行apt-get upgrade

Ubuntu变更默认源为阿里云的操作方法参考下面的链接:
https://blog.csdn.net/minicto/article/details/62240020

解决libasan3-armhf-cross方法参考了下面的链接方法:

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

https://askubuntu.com/questions/1083832/ubuntu-18-04-update-issue

你可能感兴趣的:(使用技巧)