Join us on Discord! We now have an official Discord server for OpenFLIXR: https://discord.gg/PcCErTQ , these forums will continue to operate as normal.

[SOLVED] Midnight commander tells me /usr/lib/x86_64-linux-gnu/libpgm.so.2: invalid ELF header

edited April 2018 in I'm new to OpenFLIXR
as the title says .Some how im not able to start MC :(

any help is appreciated.
Cheers
Dre

Comments

  • dredra said:
    as the title says .Some how im not able to start MC :(

    any help is appreciated.
    Cheers
    Dre

    Hi, new to this dist/app myself but have used most of the components (cp, plex, torrents, ...) for a long time. LOVE the idea of a complete out-of-the-box dist like this. But there seems to be some fuzz with the distribution libraries? Some of the shared libs seems to be corrupt? I installed 'vim' and get the same error as above.

    Also when doing an 'apt-get update' I noticed that several different versions of ubuntu is called (ppa's). Xenial, Sarge and Precise, etc. Dunno if this messes things up a bit.

    This is what I did when installing vim.

    root@openflixr:/mnt# aptitude install vim
    The following NEW packages will be installed:
      vim vim-runtime{a}
    0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6,199 kB of archives. After unpacking 30.0 MB will be used.
    Do you want to continue? [Y/n/?]
    Get: 1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2 [5,164 kB]
    Get: 2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2 [1,036 kB]
    Fetched 6,199 kB in 10s (570 kB/s)
    Selecting previously unselected package vim-runtime.
    (Reading database ... 100538 files and directories currently installed.)
    Preparing to unpack .../vim-runtime_2%3a7.4.1689-3ubuntu1.2_all.deb ...
    Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
    Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
    Unpacking vim-runtime (2:7.4.1689-3ubuntu1.2) ...
    Selecting previously unselected package vim.
    Preparing to unpack .../vim_2%3a7.4.1689-3ubuntu1.2_amd64.deb ...

    [SNIP]

    root@openflixr:/mnt# vim /etc/fstab
    vim: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libgpm.so.2: invalid ELF header

    root@openflixr:/mnt# ls -l /usr/lib/x86_64-linux-gnu/libgpm.so.2
    -rw-r--r-- 1 root root 27080 Jun 26  2013 /usr/lib/x86_64-linux-gnu/libgpm.so.2
    root@openflixr:/mnt# file /usr/lib/x86_64-linux-gnu/libgpm.so.2
    /usr/lib/x86_64-linux-gnu/libgpm.so.2: data

    root@openflixr:/mnt# file /usr/lib/x86_64-linux-gnu/libc.so
    /usr/lib/x86_64-linux-gnu/libc.so: ASCII text

  • edited April 2018
    I'm running the latest image in VMWare Workstation 14 btw.. 

    Also. Seems 'vim' was already installed as vim.basic (?) Strange since apt didn't see it and tried to install it anyways.

    root@openflixr:/mnt# file /usr/bin/vi
    /usr/bin/vi: symbolic link to /etc/alternatives/vi
    root@openflixr:/mnt# file /etc/alternatives/vi
    vi         vi.1.gz    view       view.1.gz  vim        vimdiff
    root@openflixr:/mnt# file /etc/alternatives/vi
    /etc/alternatives/vi: symbolic link to /usr/bin/vim.basic
    root@openflixr:/mnt# file /usr/bin/vim.basic
    /usr/bin/vim.basic: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5bc62a967b55e3b0b4481fec1ab800eb83eff926, stripped

  • edited April 2018
    So, reinstalling libgpm2 solved my problem.

    root@openflixr:/mnt# vim
    vim: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libgpm.so.2: invalid ELF header
    root@openflixr:/mnt# aptitude search gpm
    ...
    i A libgpm2                                                                                              - General Purpose Mouse - shared library
    ...
    root@openflixr:/mnt# aptitude reinstall libgpm2
    The following packages will be REINSTALLED:
      libgpm2
    0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
    Need to get 16.5 kB of archives. After unpacking 0 B will be used.
    Get: 1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libgpm2 amd64 1.20.4-6.1 [16.5 kB]
    Fetched 16.5 kB in 0s (31.9 kB/s)
    (Reading database ... 102245 files and directories currently installed.)
    Preparing to unpack .../libgpm2_1.20.4-6.1_amd64.deb ...
    Unpacking libgpm2:amd64 (1.20.4-6.1) over (1.20.4-6.1) ...
    Setting up libgpm2:amd64 (1.20.4-6.1) ...
    Processing triggers for libc-bin (2.23-0ubuntu10) ...

    root@openflixr:/mnt# vi
    root@openflixr:/mnt# vim
    root@openflixr:/mnt# vim --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)

    Still NO idea what happened or if it was like this from the beginning. All I did before was an 'apt-get update' and 'apt-get upgrade' (which didn't find any packages to update strangely enough..)

    @dredra this should fix your problem as well if it persists. If so - please change the topic of this thread to [SOLVED] ...
  • Thnx m8, it actually did do the trick :)

    aptitude reinstall libgpm2

    was al it needed.

  • I had the same recently, when adding vim. It was vim-tiny that was already installed, but yes the dependant libraries appeared to be broken.
  • Old, but was still relevant and fixed if it wasn't earlier in 2.9.

Sign In or Register to comment.