1

I've installed XCOM2 via Steam on Fedora 26, but it didn't work. I manually executed the installed binary and got the error:

./XCOM2: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

I then tried manually syslinking the system's (which is x64) version into ~/.local/share/Steam/steamapps/common/XCOM 2/lib/x86_64 but then it complains that the ELF class is wrong (looks like my version is a 32-bit lib targetting i686?!).

Why do I have a 32-bit version of libcrypto in /lib in the first place and (more pertinently) how do I get XCOM2 to work? I'm relatively new to Fedora and have tried to solve this myself, but I'm not sure how to proceed. Thanks very much in advance!

1

First, an

ldd ./XCOM2

will show, which libraries do your binary want to link in. You will see, exactly which ones can't be found.

You can check the architecture of a shared lib with the command

file -szL /lib/libsomething.so.a.b.c

It will say, if it is an i386 or an amd64 library. The same is for your XCOM2 binary.

The architectures should match. Although the ldd already shows, what exactly exists and what isn't.

Most distributions have at least a limited multi-arch support, what means, your system can have libraries and binaries coincidentally for multiple architectures.

Find the packages containing the missing libraries (on rpm-based distributions, it can be done with the scout tool, or deb-based ones with apt-file). Install them (on rpm, with yum, on debian, apt-get).

If the given libraries don't exist on your distribution, then you have to get them from an external source. However, manipulating the system libraries because a single binary is not useful.

Mostly, these libraries exist on a different version of the same distribution (on debian, you can find it on http://packages.debian.org, for other distros I don't know). Download the packages, extract them manually (on rpm, the command is: rpm2cpio something.rpm|cpio -i -d, on debian: dpkg -x something.deb; tar -Jxvf data.tar.xz), copy the required library files into the given directory.

With prefixing a binary by

LD_LIBRARY_PATH=/here/are/my/additional/libs ./XCOM2

you can start XCOM2 by giving this additional directory to the shared lib search path.

  • Thanks so much! After working out what libraries I needed with ldd, I managed to compile them from source and it hopefully will all work! – Isaac Woods Aug 31 '17 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.