Score:0

libegl-mesa0 package is broken and can't be upgraded/fixed because of "too-long line or missing newline" error

lv flag

Here is the output of sudo apt --fix-broken install:

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libegl-mesa0 libegl-mesa0:i386
The following packages will be upgraded:
  libegl-mesa0 libegl-mesa0:i386
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/200 kB of archives.
After this operation, 6.144 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'libwayland-server0:i386' missing; as
suming package has no files currently installed
dpkg: warning: files list file for package 'ghostscript-x' missing; assuming pac
kage has no files currently installed
dpkg: warning: files list file for package 'libudev1:amd64' missing; assuming pa
ckage has no files currently installed
dpkg: warning: files list file for package 'gnupg' missing; assuming package has
 no files currently installed
dpkg: warning: files list file for package 'libpam-systemd:amd64' missing; assum
ing package has no files currently installed
(Reading database ... 346295 files and directories currently installed.)
Preparing to unpack .../libegl-mesa0_21.2.6-0ubuntu0.1~20.04.1_i386.deb ...
dpkg: error processing archive /var/cache/apt/archives/libegl-mesa0_21.2.6-0ubun
tu0.1~20.04.1_i386.deb (--unpack):
 too-long line or missing newline in '/var/lib/dpkg/info/libegl-mesa0:i386.trigg
ers'
Preparing to unpack .../libegl-mesa0_21.2.6-0ubuntu0.1~20.04.1_amd64.deb ...
De-configuring libegl-mesa0:i386 (21.2.2-1ubuntu1pop0~1634226723~20.04~b715ae2~d
ev) ...
dpkg: error processing archive /var/cache/apt/archives/libegl-mesa0_21.2.6-0ubun
tu0.1~20.04.1_amd64.deb (--unpack):
 too-long line or missing newline in '/var/lib/dpkg/info/libegl-mesa0:i386.trigg
ers'
Errors were encountered while processing:
 /var/cache/apt/archives/libegl-mesa0_21.2.6-0ubuntu0.1~20.04.1_i386.deb
 /var/cache/apt/archives/libegl-mesa0_21.2.6-0ubuntu0.1~20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am not too good with Linux, so I have failed to fix this issue in multiple ways. What should I do?

kanehekili avatar
zw flag
what happens if you do: `sudo apt update` and `sudo apt dist-upgrade` ? Your question does not tell why you have broken packages, so what did you before you encountered this problem?
Duhon avatar
lv flag
I ended up reinstalling Ubuntu (Needed to clear some bloat anyway), but for future reference, both fail with the same error as `apt --fix-broken install`
kanehekili avatar
zw flag
Yes, that was to be expected. Still didn't tell us what you did **before** that problem occurred...
nobody avatar
gh flag
Are you using ubuntu with a pop ppa or POP OS?
Duhon avatar
lv flag
Sorry for the time it took. From what I remember dpkg wasn't working because some .lists weren't working. Namely "libwayland-server0:i386", "ghostscript-x", "libudev1:amd64", "gnupg" and "libpam-systemd:amd64". I then deleted the lists to reinstall them but it just went down from there. The issue was resolved with me reinstalling my Ubuntu, but I hope this question can help someone else.
Score:2
pt flag

If you can't resolve it,

Do this :

sudo apt-get update
sudo apt-get install -y libegl-mesa0

It will install the packages and finally check if all the packages are up to date.

sudo apt-get update

You will see all the packages are up to date! The issue is resolved

Thanks !!!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.