ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded
Asked Answered
S

3

37

Running into this issue when working with Hugo and the AWS CLI on Ubuntu 18.04.

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (failed to map segment from shared object): ignored.

This is a fresh install of Ubuntu 18.04, Hugo, and AWS CLI.

Squalid answered 18/12, 2018 at 3:7 Comment(1)
sudo apt-get install libgtk3-nocsd0:i386 fixed for me.Mastaba
S
65

Found the answer after a bit of web searching here: https://github.com/PX4/Firmware/issues/9409

Solution

If you update your .bashrc with the below line it should fix the issue:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0

In addition, you may need to install the following package:

sudo apt install gtk3-nocsd

An Alternative

Another user reported installing the following package fixed their issue:

sudo apt-get install libgtk3-nocsd0:i386
Squalid answered 18/12, 2018 at 3:7 Comment(9)
I'm running on an iMAC and running Ubuntu in a virtual machine, this fix doesn't work for me, the folder x86_64-linux-gnu doesn't exist on my system.Extinguish
What version of Ubuntu? I haven't tried this on a VM. This was on a Dell laptop.Squalid
The version of Ubuntu was 18.04Extinguish
In Ubuntu 20.04 LTS, there is no i386 build of libgtk3-nocsd0, so sudo apt-get install libgtk3-nocsd0:i386 will fail with E: Unable to locate package libgtk3-nocsd0:i386. I have attempted to get round this by installing the 18.04 DEB on 20.04: Manually download libgtk3-nocsd0_3-1ubuntu1_i386.deb and install with sudo dpkg -i libgtk3-nocsd0_3-1ubuntu1_i386.deb. This seems to work for me.Lyophilize
Can't download libgtk3-nocsd0_3-1ubuntu1_i386.deb, checked almost all mirrors from packages.ubuntu.com/bionic/i386/libgtk3-nocsd0/download. Please share if any valid mirror available.Dirge
This is basically installing unneeded package just to fix warnings ;). Just remove that old stuff like I described below.Spirant
Will this brick other applications that depend on LD_PRELOAD? Is LD_PRELOAD "additive" (and any apps requested preloads will add onto this), or will they be/this replaced by the most recent LD_PRELOAD?Ropy
I'd say, a better addition to the .bashrc is [ -e /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 ] && export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0.Hayne
In Kubuntu 20.04 the package that needs to be installed is libgtk3-nocsd0. No need to install gtk3-nocsd.Hayne
S
12

Running

$ sudo grep -r LD_PRELOAD /etc $HOME

I found lots of configuration files of the removed package gtk3-nocsd like

/etc/X11/Xsession.d/51gtk3-nocsd-detect: export LD_PRELOAD="libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}"

Just remove those old configuration with:

$ sudo apt-get purge gtk3-nocsd
Spirant answered 19/11, 2019 at 9:58 Comment(2)
This is the right answer if you upgrade to Ubuntu 20.04 and start seeing this errorKajdan
@Andrei-Emeltchenko Amazing. I just followed these exact same steps before discovering your answer. It worked like a charm. BTW : My Ubuntu 20.04 LTS comes from an Ubuntu 18.04 LTS upgrade.Terrieterrier
P
1

in file /etc/X11/Xsession.d/51gtk3-nocsd-detect change the line # 22 to

export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0"
Pilgrim answered 24/5, 2022 at 12:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.