preface
It has been roughly two or three years with ubuntu, and this is the first time I have encountered this problem, so I wrote down
. Thank you very much for letting me solve the code[2] error
error
This error occurred
dpkg: unrecoverable fatal error, aborting:
files list file for package 'linux-libc-dev:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Linux-libc-dev: AMD64 cannot be found, we need to fix this problem.
The solution
Find the damaged package and remove its status.
sudo gedit /var/lib/dpkg/status
If a Linux-LIBc-dev error is reported, delete the following:
Package: linux-libc-dev
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 5077
Maintainer: Ubuntu Kernel Team <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: linux
Version: 4.15.0-46.49
Replaces: linux-kernel-headers
Provides: aufs-dev, linux-kernel-headers
Conflicts: linux-kernel-headers
Description: Linux Kernel Headers for development
This package provides headers from the Linux kernel. These headers
are used by the installed headers for GNU glibc and other system
libraries. They are NOT meant to be used to build third-party modules for
your kernel. Use linux-headers-* packages for that.
- rename, backup the original info directory
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
Create an empty Info directory
sudo mkdir /var/lib/dpkg/info
Use apt – get updated
sudo apt-get update
Reinstall the package
sudo apt-get -f install
Code [1] Error resolution
Read More:
- E: Sub process / usr / bin / dpkg returned an error code (1) solution
- Solve the red letter prompt “sub process / usr / bin / dpkg returned an error code (2) in Cydia
- What’s the matter with updating cydia “sub-process/usr/libexec/cydia/cydo returned anerror code (2)”?
- Dpkg: error processing package XXX (- – configure) solution (red warning in the upper right corner of Ubuntu)
- dpkg:error: dpkg frontend is locked by another process
- dpkg: error: dpkg frontend is locked by another process
- Error reporting during QT operation under Ubuntu / usr / bin / LD: cannot find – LGL
- command/usr/bin/codesign failed with exit code 1- code sign error
- There is a solution to the problem: severity = corrected, type = physical layer, id = 00e5 or id = 00e8 (receiver ID) under Ubuntu
- Error: Command ‘/ usr / bin / clang’ failed with exit status 1 solution for Mac OS installation
- Command /usr/bin/codesign failed with exit code 1
- XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
- Ubuntu error: flAbsPath on /var/lib/dpkg/status failed – realpath (2: No such file or directory)
- Dpkg: error processing package XXX solution
- SSIS Error:Package Validation Error. SSIS Error Code DTS_E_OLEDBERROR. .Error code: 0x80040E37. An …
- Solution of dpkg interrupted problem
- Installing the Ubuntu system, an error wslregisterdistribution failed with error: 0x8007019e
- Solution to UBI partman failed with code 141 when installing Ubuntu
- The solution of push D command execution error (/ bin / sh: 1: push D: not found) on Ubuntu
- dpkg: error processing archive /var/cache/apt/archives/libc6-dev-amd64_2.19-0ubuntu6.9_i386.deb (–u