17

I'm using my Pi as a file server, recently when I logged in I saw a error message stating that libarmmem.so (cannot open shared object file), and despite some suggestions to run apt-get update + upgrade it did not bring much joy as it freezes the progress and just hanging.

Does anyone have any suggestion what else I could try other than reflash the card, which i would like to avoid.

From the console after "sudo apt-get update":

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Feb 24 15:55:35 2017 from vpn.lshtm.ac.uk
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/usr/bin/xauth: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
admin@ProxyPi:~$ sudo apt-get update
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
0% [Working]ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspbian.org jessie InRelease
12% [Waiting for headers] [Waiting for headers]ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspbian.org jessie/main Sources
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://archive.raspbian.org jessie/contrib Sources
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://archive.raspbian.org jessie/non-free Sources
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspbian.org jessie/rpi Sources
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

And here is after suggested libfix command :

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Feb 24 15:39:44 2017 from vpn.lshtm.ac.uk
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/usr/bin/xauth: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
admin@ProxyPi:~$ sudo ldconfig -v
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
/sbin/ldconfig.real: Path `/lib/arm-linux-gnueabihf' given more than once
/sbin/ldconfig.real: Path `/usr/lib/arm-linux-gnueabihf' given more than once
/opt/vc/lib:
        libmmal_core.so -> libmmal_core.so
        libmmal_components.so -> libmmal_components.so
        libopenmaxil.so -> libopenmaxil.so
        libmmal.so -> libmmal.so
        libWFC.so -> libWFC.so
        libEGL.so -> libEGL.so
        libvcsm.so -> libvcsm.so
        libmmal_util.so -> libmmal_util.so
        libvchiq_arm.so -> libvchiq_arm.so
        libdebug_sym.so -> libdebug_sym.so
        libGLESv2.so -> libGLESv2.so
        libbcm_host.so -> libbcm_host.so
        libOpenVG.so -> libOpenVG.so
        libmmal_vc_client.so -> libmmal_vc_client.so
        libvcos.so -> libvcos.so
        libcontainers.so -> libcontainers.so
/lib/arm-linux-gnueabihf:
        libm.so.6 -> libm-2.19.so
        librt.so.1 -> librt-2.19.so
        libpcre.so.3 -> libpcre.so.3.13.1
        libreadline.so.6 -> libreadline.so.6.3
        libnss_mdns4_minimal.so.2 -> libnss_mdns4_minimal.so.2
        libdbus-1.so.3 -> libdbus-1.so.3.8.13
        libnss_mdns_minimal.so.2 -> libnss_mdns_minimal.so.2
        libmemusage.so -> libmemusage.so
        libdevmapper-event.so.1.02.1 -> libdevmapper-event.so.1.02.1
        libpthread.so.0 -> libpthread-2.19.so
        libSegFault.so -> libSegFault.so
        libkmod.so.2 -> libkmod.so.2.2.8
        libiw.so.30 -> libiw.so.30
        libnss_nis.so.2 -> libnss_nis-2.19.so
        libthread_db.so.1 -> libthread_db-1.0.so
        libgpg-error.so.0 -> libgpg-error.so.0.13.0
        libpam.so.0 -> libpam.so.0.83.1
        libntfs-3g.so.852 -> libntfs-3g.so.852.0.0
        libcap.so.2 -> libcap.so.2.24
        libcryptsetup.so.4 -> libcryptsetup.so.4.6.0
        libcom_err.so.2 -> libcom_err.so.2.1
        libprocps.so.3 -> libprocps.so.3.0.0
        libhistory.so.6 -> libhistory.so.6.3
        libisccfg-export.so.90 -> libisccfg-export.so.90.1.0
        libudev.so.1 -> libudev.so.1.5.0
        libnl-3.so.200 -> libnl-3.so.200.19.0
        libdevmapper.so.1.02.1 -> libdevmapper.so.1.02.1
        libgcc_s.so.1 -> libgcc_s.so.1
        libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
        libpam_misc.so.0 -> libpam_misc.so.0.82.0
        libfuse.so.2 -> libfuse.so.2.9.3
        libnss_mdns.so.2 -> libnss_mdns.so.2
        libncurses.so.5 -> libncurses.so.5.9
        libattr.so.1 -> libattr.so.1.1.0
        libresolv.so.2 -> libresolv-2.19.so
        libnss_compat.so.2 -> libnss_compat-2.19.so
        libcidn.so.1 -> libcidn-2.19.so
        libselinux.so.1 -> libselinux.so.1
        libgcrypt.so.20 -> libgcrypt.so.20.0.3
        libparted.so.2 -> libparted.so.2.0.1
        libirs-export.so.91 -> libirs-export.so.91.0.0
        libudev.so.0 -> libudev.so.0.13.0
        libpopt.so.0 -> libpopt.so.0.0.0
        libss.so.2 -> libss.so.2.0
        libsysfs.so.2 -> libsysfs.so.2.0.1
        libuuid.so.1 -> libuuid.so.1.3.0
        libncursesw.so.5 -> libncursesw.so.5.9
        liblzma.so.5 -> liblzma.so.5.0.0
        libmount.so.1 -> libmount.so.1.1.0
        libacl.so.1 -> libacl.so.1.1.0
        libnss_nisplus.so.2 -> libnss_nisplus-2.19.so
        libglib-2.0.so.0 -> libglib-2.0.so.0.4200.1
        libpng12.so.0 -> libpng12.so.0.50.0
        libnss_hesiod.so.2 -> libnss_hesiod-2.19.so
        libatasmart.so.4 -> libatasmart.so.4.0.5
        libbsd.so.0 -> libbsd.so.0.7.0
        libwrap.so.0 -> libwrap.so.0.7.6
        libpamc.so.0 -> libpamc.so.0.82.1
        libnss_mdns6_minimal.so.2 -> libnss_mdns6_minimal.so.2
        libsystemd.so.0 -> libsystemd.so.0.3.1
        libaio.so.1 -> libaio.so.1.0.1
        libslang.so.2 -> libslang.so.2.3.0
        libply.so.2 -> libply.so.2.1.0
        libnss_dns.so.2 -> libnss_dns-2.19.so
        liblzo2.so.2 -> liblzo2.so.2.0.0
        liblvm2app.so.2.2 -> liblvm2app.so.2.2
        libply-boot-client.so.2 -> libply-boot-client.so.2.1.0
        libe2p.so.2 -> libe2p.so.2.3
        libtinfo.so.5 -> libtinfo.so.5.9
        libanl.so.1 -> libanl-2.19.so
        libblkid.so.1 -> libblkid.so.1.1.0
        libc.so.6 -> libc-2.19.so
        libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
        libnss_mdns6.so.2 -> libnss_mdns6.so.2
        libsmartcols.so.1 -> libsmartcols.so.1.1.0
        libcrypt.so.1 -> libcrypt-2.19.so
        libbz2.so.1.0 -> libbz2.so.1.0.4
        libexpat.so.1 -> libexpat.so.1.6.0
        libply-splash-core.so.2 -> libply-splash-core.so.2.1.0
        libnss_mdns4.so.2 -> libnss_mdns4.so.2
        libnl-genl-3.so.200 -> libnl-genl-3.so.200.19.0
        libz.so.1 -> libz.so.1.2.8
        libnsl.so.1 -> libnsl-2.19.so
        libtirpc.so.1 -> libtirpc.so.1.0.10
        libply-splash-graphics.so.2 -> libply-splash-graphics.so.2.1.0
/sbin/ldconfig.real: /lib/arm-linux-gnueabihf/ld-2.19.so is the dynamic linker, ignoring

        ld-linux-armhf.so.3 -> ld-2.19.so
        libBrokenLocale.so.1 -> libBrokenLocale-2.19.so
        libdns-export.so.100 -> libdns-export.so.100.2.2
        libaudit.so.1 -> libaudit.so.1.0.0
        libsepol.so.1 -> libsepol.so.1
        libjson-c.so.2 -> libjson-c.so.2.0.0
        libdl.so.2 -> libdl-2.19.so
        libutil.so.1 -> libutil-2.19.so
        libnfsidmap.so.0 -> libnfsidmap.so.0.3.0
        libpcprofile.so -> libpcprofile.so
        libnss_files.so.2 -> libnss_files-2.19.so
        libulockmgr.so.1 -> libulockmgr.so.1.0.1
        libkeyutils.so.1 -> libkeyutils.so.1.5
        libext2fs.so.2 -> libext2fs.so.2.4
        libisc-export.so.95 -> libisc-export.so.95.5.0
/usr/lib/arm-linux-gnueabihf:
/sbin/ldconfig.real: File /usr/lib/arm-linux-gnueabihf/libQtCLucene.so.4.8 is empty, not checked.
/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libQtXmlPatterns.so.4.8 is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libQtXmlPatterns.so.4 is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: File /usr/lib/arm-linux-gnueabihf/libQtCLucene.so.4.8.6 is empty, not checked.
/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libQtNetwork.so.4.8 is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: File /usr/lib/arm-linux-gnueabihf/libQtCLucene.so.4 is empty, not checked.
/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libQtXmlPatterns.so.4.8.6 is not an ELF file - it has the wrong magic bytes at the start.
3
  • 1
    Did you ever stumble into a solution for this? I'm having the same issue now, not very long into my fresh Raspbian installation.
    – Joncom
    Nov 4, 2017 at 16:39
  • 2
    Hi not reallly, it quite a while now but i recall battling with this for few days and eventually gave it up and went for fresh install - as it was more time efficient that way. never had the same issue after that.
    – Michael Sw
    Nov 5, 2017 at 17:39
  • Thank you. Ended up just doing a fresh install too.
    – Joncom
    Nov 7, 2017 at 9:04

3 Answers 3

35

I experienced the same error coming from a snapd 'snap'. I went into the preload file mentioned

sudo nano /etc/ld.so.preload

and commented the offending line out from

/usr/lib/arm-linux-gnueabihf/libarmmem.so

to

#/usr/lib/arm-linux-gnueabihf/libarmmem.so

2
  • 1
    This fixed my issue that I spent probably 40 minutes working on, so thank you!
    – Hercislife
    Sep 2, 2021 at 1:11
  • Real MVP right here.
    – JaredH
    Dec 16, 2022 at 0:53
4

1. Get you plataform

Check your platform in /proc/cpuinfo using command below

cat /proc/cpuinfo | grep 'model name';

In my case (Raspberry Pi 4), return:

model name  : ARMv7 Processor rev 3 (v7l)
model name  : ARMv7 Processor rev 3 (v7l)
model name  : ARMv7 Processor rev 3 (v7l)
model name  : ARMv7 Processor rev 3 (v7l)

You can view the options for ARM memory library, using command below:

ls /usr/lib/arm-linux-gnueabihf/libarmmem*

In my case, return:

/usr/lib/arm-linux-gnueabihf/libarmmem-aarch64.so
/usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so
/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so
/usr/lib/arm-linux-gnueabihf/libarmmem-v8l.so

Then, according with /proc/cpuinfo, I need to use /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so, because exist a library for my platform:

CPU info results List Results
ARMv7 Processor rev 3 (v7l) /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so

2. Setup Dynamic Linker

Change preload of dynamic linker using command below:

sudo nano /etc/ld.so.preload

Using nano editor, replace

/usr/lib/arm-linux-gnueabihf/libarmmem.so

or in my case

/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATAFORM}.so

by

/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so

or according your platform.

5
  • While this seems to be the correct answer, the only thing that worked for me was to comment out the line in /etc/ld.so.preload.
    – vesperto
    Jan 26 at 10:00
  • 1
    Commenting Dynamic Linker do not resolve the problem, but disable configuration entry, disabling, in this case, The ARM Memory Library. It can generate a unexpected environment, may cause problems with ELF applications that need this resource. Jan 27 at 16:13
  • @D.H.B.Marcos what you are saying makes sense, however, on a pi that prints the very same info as yours the fix did not work i.e. hello-world still prints "ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored".
    – eglasius
    Feb 8 at 14:29
  • @eglasius, I have identified that the fault is in "${PLATAFORM}". The Bash ou sh should interpret and replace this variable at run "/etc/ld.so.preload". Try set environmental variable in "/etc/environment" or before trouble line. Check the path and existence of library in "/usr/lib/arm-linux-gnueabihf/". I hope this helps. Feb 10 at 10:54
  • To me it was not the PLATFORM variable that is the problem as changing still gives the same problem ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so' from /etc/ld.so.preload cannot be preloaded Mar 24 at 8:05
0

pi@raspberrypi:~ $ hello-world

ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-v8l.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. Hello World!

only commenting the line with # worked but I don't know the its implication.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jan 23, 2022 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.