004-After the Ubuntu version is upgraded (with a red icon in the upper right corner), the dependency is not satisfied when the apt upgrade is performed. How to solve libc6-dev-armhf-cro in Ubuntu 18.04

After the Ubuntu version is upgraded (with a red icon in the upper right corner), apt reports an error, and the dependency is not satisfied . How to solve the error of libc6-dev-armhf-cross in Ubuntu 18.04! as follows:

Preparing to unpack.../libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb …Unpacking
libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) to (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
error message is displayed local system has some problems, so do not write apport reports
are ready to unpack ... / libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
are being libc6-armhf- cross (2.27-3ubuntu1cross1.1) unpacked to (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: There is no such file or directory. The
error message shows that there is some problem with the local system, so no apport is written to report
that an error occurred during 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)

Error message promptInsert picture description here

First, delete the offending package and clear its configuration without removing the dependencies:
sudo dpkg -P --force-depends libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross libc6-dev-armhf -cross

Clean the package cache:
sudo apt clean

Update the packing list:
sudo apt update

Repair broken dependencies (two deleted packages should be installed automatically):
sudo apt -f install

Finally, install the remaining two packages:
sudo apt install libc6-dev-armel-cross libc6-dev-armhf-cross
This will restore the system to a working state.

Guess you like

Origin blog.csdn.net/mmmmmCJP/article/details/109316024