UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Rep:
invalid ELF header
I have some corrupted libs if this are the correct term and for example anything apt related fails:
Quote:
Would anybody know how to query how many corrupted files are? I know are 4806 list files but how many are corrupted?
Code:
root@ubuntu:/TEMPLIB# apt purge libportsmf0v5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
audacity-data
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
audacity* libportsmf0v5*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libportsmf0v5:amd64' is missing final newline
/usr/bin/gdbus: error while loading shared libraries: /lib/x86_64-linux-gnu/libgmodule-2.0.so.0: invalid ELF header
E: Sub-process /usr/bin/dpkg returned an error code (2)
I am intersted to solve this:
Code:
/usr/bin/gdbus: error while loading shared libraries: /lib/x86_64-linux-gnu/libgmodule-2.0.so.0: invalid ELF header
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libportsmf0v5:amd64' is missing final newline
I understood from previous post that the files are where should be but they are corrupted:
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by pan64
what I see you need to replace this file: /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.6800.4
I know that but I can't. That is what I tried to install:
Code:
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libportsmf0v5:amd64' is missing final newline
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by pan64
I told you. unpack the deb package and manually replace that file.
I just tried to install it and failed but I think I understand what you said now. This is something I have not done. I will extract the file(s) and replace them.
Is this the same thing as replacing the file from other stable filesystem? Because these corrupted files could be replaced once from one /usr/lib/x86_64-linux-gnu/ location to another? Just a thought. Thanks so much, I see the light again.
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by pan64
it is almost the same, just 1. save the old file to be able to restore it. 2. be careful about the file you pick (if that is really compatible)
1. save the old file to be able to restore it.
why need to restore (eventually) when was corrupted and just replaced with a presumable good one?
I extracted libgmodule-2.0.so.0.6800.4 from deb and installed in /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.6800.4 and run again:
Code:
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libglib2.0-0:amd64' is missing final newline
so looking for itself? Confusion again...
before was looking after:
Code:
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libportsmf0v5:amd64' is missing final newline
Distribution: SOLARIS/BSD-like, some Debian-like, some Arch-like, some GENTO-like, some RH-like, some slacky-like
Posts: 386
Original Poster
Rep:
Quote:
Originally Posted by pan64
no, that is the *.list file in /var/lib/dpkg/info. You might need to remove and/or replace it too.
OK, then I did replace .list with proper content because was corrupted (see #4)
OK I fixed that: the .list content was read by nano but not by cat, less, more. I rm and recreated it and is read correctly by by cat, less, more and nano.
now we passed that and next:
Code:
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libglib2.0-bin' is missing final newline
did the same and fixed, now the next is:
Code:
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'rpcbind' contains empty filename
BTW, I Scaned all the directories again. Please have a look maybe is something I missed:
Code:
ldconfig -v | head
/sbin/ldconfig.real: Can't stat /usr/local/lib/i386-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/i386-linux-gnu' given more than once
(from /etc/ld.so.conf.d/i386-linux-gnu.conf:4 and /etc/ld.so.conf.d/i386-linux-gnu.conf:3)
/sbin/ldconfig.real: Can't stat /usr/local/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
(from /etc/ld.so.conf.d/x86_64-linux-gnu.conf:4 and /etc/ld.so.conf.d/x86_64-linux-gnu.conf:3)
/sbin/ldconfig.real: Path `/usr/lib32' given more than once
(from /etc/ld.so.conf.d/zz_i386-biarch-compat.conf:3 and /etc/ld.so.conf.d/zz_i386-biarch-compat.conf:2)
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
(from <builtin>:0 and /etc/ld.so.conf.d/x86_64-linux-gnu.conf:3)
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
(from <builtin>:0 and /etc/ld.so.conf.d/x86_64-linux-gnu.conf:3)
/sbin/ldconfig.real: Path `/usr/lib' given more than once
(from <builtin>:0 and <builtin>:0)
/sbin/ldconfig.real: /lib/i386-linux-gnu/ld-linux.so.2 is the dynamic linker, ignoring
/usr/lib/x86_64-linux-gnu/libfakeroot: (from /etc/ld.so.conf.d/fakeroot-x86_64-linux-gnu.conf:1)
libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu: (from /etc/ld.so.conf.d/i386-linux-gnu.conf:3)
libanl.so.1 -> libanl.so.1
libBrokenLocale.so.1 -> libBrokenLocale.so.1
libjbig.so.0 -> libjbig.so.0
libgobject-2.0.so.0 -> libgobject-2.0.so.0.6800.4
libXi.so.6 -> libXi.so.6.1.0
libcrypto.so.1.1 -> libcrypto.so.1.1
libxcb-render.so.0 -> libxcb-render.so.0.0.0
OK fixed (rm .list and recreated), move on ... could be hundreds ... keep going ...
Code:
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'mesa-utils' is missing final newline
root@ubuntu:/TEMPLIB# ^C
root@ubuntu:/TEMPLIB# nano /var/lib/dpkg/info/mesa-utils.list
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'x11-utils' is missing final newline
root@ubuntu:/TEMPLIB# ^C
root@ubuntu:/TEMPLIB# nano /var/lib/dpkg/info/x11-utils.list
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libisl23:amd64' is missing final newline
root@ubuntu:/TEMPLIB# nano /var/lib/dpkg/info/libisl23:amd64.list
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'gfortran-11' is missing final newline
root@ubuntu:/TEMPLIB# nano /var/lib/dpkg/info/gfortran-11.list
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'g++-11' is missing final newline
root@ubuntu:/TEMPLIB# nano /var/lib/dpkg/info/g++-11.list
root@ubuntu:/TEMPLIB# dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'compiz-gnome' is missing final newline
libapache2-mod-php7.4 not available for impish ... move on
some i386 are requested. Why? I satisfied the requests anyway ...
this I cannot fix. I removed and created a new file list and no go
Code:
dpkg -i libglib2.0-0_2.68.4-1ubuntu1_amd64.deb
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libvlc-bin:amd64' is missing final newline
fixed, move on ...
CAN'T find i3xrocks ('fixed' with an empty file list).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.