5

I installed Gparted with sudo apt install gparted and sudo apt install -f. When I typed sudo gparted, it tells me:

Unit -.mount does not exist, proceeding anyway.
/usr/sbin/gpartedbin: error while loading shared libraries: libglibmm-2.4.so.1: cannot open shared object file: No such file or directory

I'm using Ubuntu 18.04 LTS, and it's not the first time that I met such library related problem (see another question posted by me).
I found a review in Ubuntu Software telling me that GParted can't run on 18.04, so I consider this a version related problem.
The output for apt-cache policy gparted libgtkmm-2.4-1v5 is

gparted:
Installed: 0.30.0-3ubuntu1
Candidate: 0.30.0-3ubuntu1
Version table:
*** 0.30.0-3ubuntu1 500
    500 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic/main amd64 Packages
    100 /var/lib/dpkg/status
libgtkmm-2.4-1v5:
Installed: 1:2.24.5-2
Candidate: 1:2.24.5-2
Version table:
*** 1:2.24.5-2 500
    500 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic/main amd64 Packages
    100 /var/lib/dpkg/status

The output for grep -r -v ^# /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep ppa is

/etc/apt/sources.list.d/snwh-ubuntu-pulp-bionic.list:deb http://ppa.launchpad.net/snwh/pulp/ubuntu bionic main

The output for ldd /usr/sbin/gpartedbin | grep not is

libcairomm-1.0.so.1 => not found
libgiomm-2.4.so.1 => not found
libglibmm-2.4.so.1 => not found
libsigc-2.0.so.0 => not found

But when I run sudo apt install libglibmm-2.4-1v5 (also for other missing libraries) it says something like

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglibmm-2.4-1v5 is already the newest version (2.56.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I reinstalled the packages with sudo apt-get install --reinstall libcairomm-1.0-1v5 libglibmm-2.4-1v5 libsigc++-2.0-0v5 and executed

ldd /usr/lib/x86_64-linux-gnu/libcairomm-1.0.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 | grep not

GParted can now function well. Thanks for everyone's sincere help.

KestrelW
  • 137
  • 1
  • 2
  • 9
  • 1
    Your system seems to be broken. All these packages install normally on clean 18.04 LTS. Please add output of the `apt-cache policy gparted libgtkmm-2.4-1v5` (source of gparted and libgtkmm-2.4-1v5 packages) and `grep -r -v ^# /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep ppa` (list of your PPAs), `ldd /usr/sbin/gpartedbin | grep not` (missed libraries by gparted) to the question. – N0rbert May 16 '18 at 07:43
  • 1
    So we have four library packages - try to reinstall them `sudo apt-get install --reinstall libcairomm-1.0-1v5 libglibmm-2.4-1v5 libsigc++-2.0-0v5` and then try to find broken libraries with `ldd /usr/lib/x86_64-linux-gnu/libcairomm-1.0.so.1 | grep not`, `ldd /usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 | grep not`, `ldd /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 | grep not`, `ldd /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 | grep not`. Add all outputs to question. – N0rbert May 16 '18 at 08:31
  • I posted my last comment as answer, so you can accept it and vote for it. – N0rbert May 16 '18 at 21:09
  • 1
    any drive you wish to alter using gparted should NOT be currently mounted ... this means you should boot your box using a ubuntu liveCD or USB ... once booted from liveCD launch its gparted ... it makes little sense to install or execute gparted on your laptop/desktop itself as by definition your drive will be mounted rendering ability of gparted moot – Scott Stensland May 16 '18 at 22:28

1 Answers1

3

We have four libraries:

  • libcairomm-1.0.so.1
  • libgiomm-2.4.so.1
  • libglibmm-2.4.so.1
  • libsigc-2.0.so.0

Try to reinstall their packages with the following command:

sudo apt-get install --reinstall libcairomm-1.0-1v5 libglibmm-2.4-1v5 \
libsigc++-2.0-0v5

Then check their linkage:

ldd /usr/lib/x86_64-linux-gnu/libcairomm-1.0.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 | grep not
N0rbert
  • 97,162
  • 34
  • 239
  • 423