libfreetype.so.6 not found

Discussions about Servers
User avatar
Barbie
Godlike
Posts: 2536
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

libfreetype.so.6 not found

Post by Barbie »

I'm just setting up a new UT server on Ubuntu 20.04.4 LTS x64 and get
~/ut-server/System$ ./ut-bin: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
~/ut-server/System$ locate libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.17.1
~/ut-server/System$ file /usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6: symbolic link to libfreetype.so.6.17.1
~/ut-server/System$ file /usr/lib/x86_64-linux-gnu/libfreetype.so.6.17.1
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.17.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=41b7f69ff4d29aeaad7bd4f548d026e8eaedca84, stripped
~/ut-server/System$ ldd ./ut-bin
linux-gate.so.1 (0xf7f50000)
Engine.so => /home/ut99/ut-server/System/./Engine.so (0xf7b9d000)
Core.so => /home/ut99/ut-server/System/./Core.so (0xf78bf000)
libdl.so.2 => /lib32/libdl.so.2 (0xf78b0000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf788d000)
libxmp.so.4 => /home/ut99/ut-server/System/./libxmp.so.4 (0xf780f000)
libSDL2-2.0.so.0 => /home/ut99/ut-server/System/./libSDL2-2.0.so.0 (0xf769e000)
libSDL2_ttf-2.0.so.0 => /home/ut99/ut-server/System/./libSDL2_ttf-2.0.so.0 (0xf7695000)
libopenal.so.1 => /home/ut99/ut-server/System/./libopenal.so.1 (0xf7525000)
libm.so.6 => /lib32/libm.so.6 (0xf7421000)
libc.so.6 => /lib32/libc.so.6 (0xf7235000)
/lib/ld-linux.so.2 (0xf7f51000)
librt.so.1 => /lib32/librt.so.1 (0xf7227000)
libfreetype.so.6 => not found
libatomic.so.1 => /lib32/libatomic.so.1 (0xf721d000)
libstdc++.so.6 => /lib32/libstdc++.so.6 (0xf703e000)
libgcc_s.so.1 => /lib32/libgcc_s.so.1 (0xf701f000)
So it looks like I need a 32 bit version of libfreetype?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 1928
Joined: Sat Mar 21, 2020 5:32 am

Re: libfreetype.so.6 not found

Post by Buggie »

Yes. For x32 binary all libs must be x32.
User avatar
Barbie
Godlike
Posts: 2536
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: libfreetype.so.6 not found

Post by Barbie »

So where to get that?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 1928
Joined: Sat Mar 21, 2020 5:32 am

Re: libfreetype.so.6 not found

Post by Buggie »

Possible via
apt-get install lib32stdc++6
but not sure
https://ubuntuforums.org/showthread.php?t=2187957

Maybe need full line:
apt-get install lib32stdc++6 libgtk2.0-0:i386 libgstreamer-plugins-base0.10-0:i386
User avatar
Barbie
Godlike
Posts: 2536
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: libfreetype.so.6 not found

Post by Barbie »

Yes, thanks, found that too, but wanted to ask before installing tons of unneeded packages.

Automatically merged

Really an adventure… Why can't it simply work? I had spent hours of life time for unnecessary rubbish. :wth:
~# LC_ALL=C apt-get install libgtk2.0-0:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgtk2.0-0:i386
E: Couldn't find any package by glob 'libgtk2.0-0'
E: Couldn't find any package by regex 'libgtk2.0-0'

Automatically merged

I'm on a wrong track: same happens on running public server, so there must be another stumbling block.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
snowguy
Novice
Posts: 3
Joined: Sun Feb 17, 2019 9:07 am

Re: libfreetype.so.6 not found

Post by snowguy »

In case it helps any, I had similar dependency problems on a new Debian 11 install recently. It should be close enough to Ubuntu to be relevant but package names could be different. I didn't need 32 bit libfreetype for some reason but the following worked for me, most of which you have probably already discovered:

To add 32 bit arch:
dpkg --add-architecture i386

To see that it worked:
dpkg --print-foreign-architectures

apt-get update
apt install libc6:i386
apt install libstdc++6:i386
apt install libx11-6:i386
apt install libxext6:i386

Some extra notes I kept:

You can search for packages to install with the following but it won't list the 32bit equivalents. The names should be the same for 32 bit packages so you should just be able to append :i386 to the package name if found. (example using libfreetype)
apt-cache search libfreetype

You can find what you have already installed with:
apt list --installed

And of course to find something specific you have already installed: (example using libstdc++)
apt list --installed | grep libstdc++
Buggie
Godlike
Posts: 1928
Joined: Sat Mar 21, 2020 5:32 am

Re: libfreetype.so.6 not found

Post by Buggie »

Barbie wrote: Thu May 05, 2022 10:26 am Really an adventure… Why can't it simply work? I had spent hours of life time for unnecessary rubbish. :wth:
Because it is Linux way. :lol:
Eternity
Experienced
Posts: 136
Joined: Sat Nov 30, 2019 10:56 pm

Re: libfreetype.so.6 not found

Post by Eternity »

IIRC, in order to get UT server working i had to add at least these 3 items:
snowguy wrote: Thu May 05, 2022 10:45 am dpkg --add-architecture i386
apt install libc6:i386
apt install libstdc++6:i386

Automatically merged

There is 64-bit version of UT for Linux out now. Wonder if it works without installing any additional packages...
User avatar
Barbie
Godlike
Posts: 2536
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: libfreetype.so.6 not found

Post by Barbie »

Works now. :)
I think that this was enough:
apt-get install ia32-libs
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett