Trying to run Opera on Freebsd with Linuxulator : error while loading shared libraries: /lib/libfreetype.so.6: ELF file OS ABI invalid reddit / freebsd ---------------------------------------------------------------------- loziomario · 2022-01-13 22:21 Hello to everyone. Below u can see all the tries that I did to find the correct file requested by the Opera for Linux that I've found inside the ports. Any file I tried didn't well. Do u know what could be the correct version ? 10x ​ root@marietto:/usr/home/marietto # /usr/local/bin/linux-opera /usr/local/lib/linux-opera/opera: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory root@marietto:/usr/home/marietto # find / -name libfreetype.so.6 /usr/local/lib/libfreetype.so.6 /usr/home/marietto/.i386-wine-pkg/usr/local/lib/libfreetype.so.6 /compat/ubuntu/home/marietto/.i386-wine- pkg/usr/local/lib/libfreetype.so.6 /compat/ubuntu/usr/lib/x86_64-linux-gnu/libfreetype.so.6 ^C root@marietto:/usr/home/marietto # cp /usr/local/lib/libfreetype.so.6 /lib root@marietto:/usr/home/marietto # /usr/local/bin/linux-opera /usr/local/lib/linux-opera/opera: error while loading shared libraries: libfreetype.so.6: wrong ELF class: ELFCLASS64 root@marietto:/usr/home/marietto # rm /lib/libfreetype.so.6 root@marietto:/usr/home/marietto # cp /compat/ubuntu/usr/lib/x86_64-linux-gnu/libfreetype.so.6 /lib root@marietto:/usr/home/marietto # /usr/local/bin/linux-opera /usr/local/lib/linux-opera/opera: error while loading shared libraries: libfreetype.so.6: wrong ELF class: ELFCLASS64 root@marietto:/usr/home/marietto # rm /lib/libfreetype.so.6   root@marietto:/usr/home/marietto # cp /usr/home/marietto/.i386-wine-pkg/usr/local/lib/libfreetype.so.6 /lib root@marietto:/usr/home/marietto # /usr/local/bin/linux-opera /usr/local/lib/linux-opera/opera: error while loading shared libraries: /lib/libfreetype.so.6: ELF file OS ABI invalid ​ ---------------------------------------------------------------------- trasz · 2022-01-13 22:59 It fails with “ABI invalid” because you have copied a FreeBSD shared library, and Linux processes require Linux shared libraries. Can you try the debootstrap method with, say, bionic? This should be easier (use apt) and will give you much more up to date userspace. https://docs.freebsd.org/en/books/handbook/linuxemu/#linuxemu- debootstrap ---------------------------------------------------------------------- loziomario · 2022-01-13 23:10 >root@marietto:/usr/home/marietto # cp /compat/ubuntu/usr/lib/x86\_64-linux-gnu/libfreetype.so.6 /lib this file does not come from freebsd...and it says : **wrong ELF class: ELFCLASS64** ; so the required file is not 64 bit....can u help me to find the 32 bit file somewhere on the internet ? ---------------------------------------------------------------------- trasz · 2022-01-13 23:18 Wait, how did you install Opera? From FreeBSD packages? Because if so, it should have pulled in a dependency, linux-c7-freetype. In any case, this particular FreeBSD package seems to contain Linux 32-bit libfreetype.so.6.14.0 ---------------------------------------------------------------------- loziomario · 2022-01-13 23:18 found it here : https://packages.ubuntu.com/focal/i386/libfreetype6/download now it wants another file : root@marietto:/usr/home/marietto/Downloads # linux-opera /usr/local/lib/linux-opera/opera: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- loziomario · 2022-01-13 23:19 yes. but : root@marietto:/usr/home/marietto/Downloads # pkg install linux-c7-freetype Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent versions of packages are already installed ---------------------------------------------------------------------- FUZxxl · 2022-01-13 23:20 You cannot just download random shared object files from random places and expect that to work. ---------------------------------------------------------------------- loziomario · 2022-01-13 23:21 I like the challenges :D it may work :P ; anyway the ubuntu packages is not a random place. come on. ---------------------------------------------------------------------- FUZxxl · 2022-01-13 23:23 Ubuntu pages are unlikely to work because the Linuxulator packages are based on CentOS 7. And even taking random CentOS libraries may fail. If shared libraries are missing, try installing them from the FreeBSD package manager (the Linux packages are called `linux-c7-...`). ---------------------------------------------------------------------- loziomario · 2022-01-13 23:25 you are right : ThunarThumbnailer: ld-elf.so.1: /lib/libfreetype.so.6: unsupported file layout ---------------------------------------------------------------------- loziomario · 2022-01-13 23:26 I've already did that. tell me all the packages that I should install. Maybe there is some of them that I missed. ---------------------------------------------------------------------- trasz · 2022-01-13 23:26 Can you do „ldd /usr/local/lib/linux-opera/opera” and „sysctl compat.linux.emul_path” and paste the output of both? ---------------------------------------------------------------------- loziomario · 2022-01-13 23:28 root@marietto:/usr/home/marietto/Downloads # ldd /usr/local/lib/linux- opera/opera /usr/local/lib/linux-opera/opera: linux32_vdso.so.1 (0xffffe000) libfreetype.so.6 => not found libfontconfig.so.1 => not found libSM.so.6 => not found libICE.so.6 => not found libXext.so.6 => not found libXrender.so.1 => not found libX11.so.6 => not found libpthread.so.0 => /lib32/libpthread.so.0 (0x29460000) librt.so.1 => /lib32/librt.so.1 (0x29483000) libdl.so.2 => /lib32/libdl.so.2 (0x2948e000) libstdc++.so.6 => /lib32/libstdc++.so.6 (0x29496000) libm.so.6 => /lib32/libm.so.6 (0x29674000) libgcc_s.so.1 => /lib32/libgcc_s.so.1 (0x29778000) libc.so.6 => /lib32/libc.so.6 (0x29797000) /lib/ld-linux.so.2 (0x29408000) ---------------------------------------------------------------------- loziomario · 2022-01-13 23:29 root@marietto:/usr/home/marietto/Downloads # sysctl compat.linux.emul_path compat.linux.emul_path: /compat/ubuntu ---------------------------------------------------------------------- FUZxxl · 2022-01-13 23:31 Try to answer /u/trasz' [question](https://www.reddit.com/r/freebsd/co mments/s3be9y/trying_to_run_opera_on_freebsd_with_linuxulator/hsjylyv/ ) first: where did you install Opera from? ---------------------------------------------------------------------- loziomario · 2022-01-13 23:32 pkg install linux-opera ---------------------------------------------------------------------- trasz · 2022-01-13 23:34 Ah, okay. So, the reason it doesn’t work is that you have it set up to look for Linux libraries in /compat/ubuntu, and FreeBSD ports install stuff into /compat/linux. Can you change that sysctl back to default and try running it again? If it fails - please do ldd again. ---------------------------------------------------------------------- trasz · 2022-01-13 23:36 I’ve assumed Ubuntu would work, but then OP mentioned 32-bit, and iirc there were some issues with 32-bit Ubuntu libraries. ---------------------------------------------------------------------- loziomario · 2022-01-13 23:37 I can't. On /compat/linux I have installed another linux distro... ---------------------------------------------------------------------- FUZxxl · 2022-01-13 23:38 Each distribution's libraries are built against the other libraries of that distribution. You can't really mix and match. ---------------------------------------------------------------------- trasz · 2022-01-13 23:39 Can you move your /compat/linux to /compat/otherdistro, then uninstall all the Linux packages (ignoring the errors about nonexistent files) and install linux-c7-opera again? (Installing your own stuff into /compat/linux is discouraged, because FreeBSD ports/packages assume it’s all theirs.) ---------------------------------------------------------------------- loziomario · 2022-01-13 23:41 it's becoming complicated. what's the command for changing the compat.linux.emul\_path variable from /compat/ubuntu to /compat/linux ? ---------------------------------------------------------------------- loziomario · 2022-01-13 23:43 or maybe I can rename /compat/ubuntu to /compat/linux and viceversa ---------------------------------------------------------------------- trasz · 2022-01-13 23:46 I mean, you are right, but it’s like saying a car can’t run on paint thinner. I mean, yeah, you shouldn’t be doing that, but sometimes it happens to work :-) ---------------------------------------------------------------------- trasz · 2022-01-13 23:48 It depends how did you change it in the first place (/etc/sysctl.conf?), but try “sysctl compat.linux.emul_path=/compat/linux”, as root. Do not put stuff into /compat/linux by yourself, this is how this started in the first place :-) ---------------------------------------------------------------------- loziomario · 2022-01-13 23:49 I'm not sure if it is 32 bit. I've assumed that it is because it seemed that it accepted the 32 bit library,but it didnt. ---------------------------------------------------------------------- loziomario · 2022-01-13 23:51 anyway,no,at the moment I don't want to remove all the linux packages. ---------------------------------------------------------------------- trasz · 2022-01-13 23:51 Assuming you are talking about the Opera from FreeBSD packages, then yes, it’s 32-bit. ---------------------------------------------------------------------- loziomario · 2022-01-13 23:52 ok ---------------------------------------------------------------------- grahamperrin · 2022-01-14 00:23 > pkg install linux-opera I installed it long ago, recently updated, it works. % pkg info --list linux-opera | grep bin/ /usr/local/bin/linux-opera % linux-opera % How are you starting the application? ### Postcript With regard to other comments, I forgot to mention, I have the traditional `linux_enable`. % sysrc -f /etc/rc.conf linux_enable ubuntu_enable linux_enable: YES ubuntu_enable: NO % ---------------------------------------------------------------------- loziomario · 2022-01-14 01:00 root@marietto:/usr/home/marietto # pkg info --list linux-opera | grep bin/ /usr/local/bin/linux-opera /usr/local/bin/linux-opera ---------------------------------------------------------------------- loziomario · 2022-01-14 01:02 > sysrc -f /etc/rc.conf linux_enable ubuntu_enable sysrc -f /etc/rc.conf linux_enable ubuntu_enable linux_enable: YES ubuntu_enable: YES ---------------------------------------------------------------------- loziomario · 2022-01-14 01:05 I start the application while I'm on FreeBSD,as root,giving the command : linux-opera ---------------------------------------------------------------------- grahamperrin · 2022-01-14 05:44 > ,as root, Why? I know, in the past, you chose this whilst learning but honestly, it's not a good habit. People will be less inclined to help you. ---------------------------------------------------------------------- grahamperrin · 2022-01-14 05:45 > linux_enable: YES > > ubuntu_enable: YES *Is it possible* to enable both **and** have them both work as expected? (I have not kept myself familiar with tricks.) ---------------------------------------------------------------------- trasz · 2022-01-14 09:05 It is, the latter doesn’t do anything. ---------------------------------------------------------------------- loziomario · 2022-01-14 10:52 I've declared "ubuntu\_enable=NO" on /etc/rc.conf and I did : root@marietto:/home/marietto # linux-opera /usr/local/lib/linux-opera/opera\_autoupdatechecker: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory but it worked. anyway,the version of opera is 12x ,very old. I read that it's not good to run such old version of opera. 13x is better. ---------------------------------------------------------------------- loziomario · 2022-01-14 11:02 yeah,sometime I feel more comfortable to be root. Fortunately my PC is not involved into some production environment. Anyway,yes it's a not a good habit. Since I'm an hobbyist,for me it's like to dress my slippers indoors.