Error while loading shared libraries libtinfo so 6

Trying to run the linux binary 30802.1.0 results in the following error message on Ubuntu 16.04.2 LTS (Xenial). > ./matterhorn ./matterhorn: error while loading shared libraries: libtinfo.so.6: ...

@ulfsauer0815

Trying to run the linux binary 30802.1.0 results in the following error message on Ubuntu 16.04.2 LTS (Xenial).

> ./matterhorn
./matterhorn: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

Looks like it is dynamically linked to libtinfo6, which it cannot find:

> ldd ./matterhorn 
        linux-vdso.so.1 =>  (0x00007ffdb9983000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0882773000)
        libtinfo.so.6 => not found
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f088256a000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f0882367000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0882162000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0881f45000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f0881cc5000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f08819bb000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f08817b3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08813ea000)
        /lib64/ld-linux-x86-64.so.2 (0x000055ff2eb0b000)

I can only find libtinfo5 in my sources:

> apt-file search libtinfo.so
lib32tinfo-dev: /usr/lib32/libtinfo.so
lib32tinfo5: /lib32/libtinfo.so.5
lib32tinfo5: /lib32/libtinfo.so.5.9
libtinfo-dev: /usr/lib/x86_64-linux-gnu/libtinfo.so
libtinfo5: /lib/x86_64-linux-gnu/libtinfo.so.5
libtinfo5: /lib/x86_64-linux-gnu/libtinfo.so.5.9
libtinfo5-dbg: /usr/lib/debug/libtinfo.so.5
libtinfo5-dbg: /usr/lib/debug/libtinfo.so.5.9
libx32tinfo-dev: /usr/libx32/libtinfo.so
libx32tinfo5: /usr/libx32/libtinfo.so.5
libx32tinfo5: /usr/libx32/libtinfo.so.5.9

The libtinfo5 description says that this is a terminfo library for ncurses.

I’m not really in the mood of compiling ncurses6 at the moment… :(
Any suggestions on what to do?

@jtdaugherty

Thanks for the report!

Is it possible for you to build from source? (I know this may not be possible or it may be onerous.) If it isn’t possible, I can look into shipping binary releases for Ubuntu, but even then it’d be a specific version of Ubuntu (probably the latest).

The binary that we provide for Linux is actually for Fedora; I’ll make a ticket to improve our release archive naming so that’s clearer.

@ulfsauer0815

I build it from source, which worked fine (after installing happy), but was greeted with a json decode exception mentioning the server version after logging in.

After looking at the readme I checked out the corresponding tag 30701.0.0 and built it again.
This resulted in a compilation error in src/Types.hs . Looking at the log I saw that it was still using the wrong mattermost-api dependency — so I adjusted that as well and rebuilt it.

This worked fine but after starting it, logging in and seeing the chat window for a split second it crashed again with the following message:

> ./.cabal-sandbox/bin/matterhorn 
Authenticating...
Loading channels for team "epages"...
matterhorn: src/Network/Mattermost/WebSocket/Types.hs:147:10-38: No instance nor default method for class operation fromDataMessage

@jtdaugherty

Is it possible for you to build the 30802.1.0 tag and use a 3.8 server? There’s a fix for that websocket issue in 3.8.

@ulfsauer0815

I don’t have direct access to the mattermost server, but I will try to figure something out.
Thank you for your help!

@jtdaugherty

Okay. You’re welcome — this has been helpful to raise some issues we need to work on. Thanks!

@aparcar

On Debian Testing I have the same error message with 30802.1.0, should I open a new issue?

@jtdaugherty

@aparcar — no, that’s the same kind of problem reported here. In particular, our binaries are for Fedora 25 only, so running on any other distribution is likely to yield dynamic linking errors. Going forward we will be producing Ubuntu Xenial binary releases, so you can either run those (out soon) or build from source. Sorry!

@SithaJagan

Hi,
I was trying to install Fermi software in my laptop which has OS type 64bit Ubuntu 16.04-LTS. My heasoft version is 6.24. I did not get any error while installing fermi. Then I edited my bashrc to give path to Fermi directory and did alias. After initializing heasoft, I was trying to initialize fermi, at that time I was not able to initialize Fermi from terminal. Then I tried setting environment of Fermi from the terminal itself and trying to run gtselect. But showed the error

gtselect: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory

I tried to locate libtinfo.so. Then terminal shows this:

/lib/x86_64-linux-gnu/libtinfo.so.5

/lib/x86_64-linux-gnu/libtinfo.so.5.9

/usr/lib/x86_64-linux-gnu/libtinfo.so

Hence I created a soft link using this command:

sudo ln -s /lib/x86_64-linux-gnu/libtinfo.so.5.9 /lib/x86_64-linux-gnu/libtinfo.so.6

After this, I could initialize fermi from the terminal itself. But, the above mentioned error remains still while doing gtselect.

gtselect: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory

Earlier, in my Ubuntu 14.04-64 OS with heasoft 6.22 version, I didn’t get any error like this. Can anyone suggest a solution for this?

@jtdaugherty

@SithaJagan I think you might have reported this on the wrong project.

@armoralesr

Hi,
I was trying to install Fermi software in my laptop which has OS type 64bit Ubuntu 16.04-LTS. My heasoft version is 6.24. I did not get any error while installing fermi. Then I edited my bashrc to give path to Fermi directory and did alias. After initializing heasoft, I was trying to initialize fermi, at that time I was not able to initialize Fermi from terminal. Then I tried setting environment of Fermi from the terminal itself and trying to run gtselect. But showed the error

gtselect: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory

I tried to locate libtinfo.so. Then terminal shows this:

/lib/x86_64-linux-gnu/libtinfo.so.5

/lib/x86_64-linux-gnu/libtinfo.so.5.9

/usr/lib/x86_64-linux-gnu/libtinfo.so

Hence I created a soft link using this command:

sudo ln -s /lib/x86_64-linux-gnu/libtinfo.so.5.9 /lib/x86_64-linux-gnu/libtinfo.so.6

After this, I could initialize fermi from the terminal itself. But, the above mentioned error remains still while doing gtselect.

gtselect: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory

Earlier, in my Ubuntu 14.04-64 OS with heasoft 6.22 version, I didn’t get any error like this. Can anyone suggest a solution for this?

I had the same issue, and try this

sudo ln -s /lib/x86_64-linux-gnu/libncurses.so.5.9 /lib/x86_64-linux-gnu/libncurses.so.6

after that, fermi works well.

Hope this helps.

@jtdaugherty

Since this ticket seems to get a lot of Google traffic, I wanted to just mention down here at the bottom that we do release builds for 18.04, so check out the 18.04 build if you’re having this problem.

I’ve installed and updated tmux and emacs via conda in my default environment, and have these versions in conda list:

# packages in environment at /home/maxghenis/miniconda3:
#
# Name                    Version                   Build  Channel
tmux                      2.7                  hc78d2af_1    conda-forge
emacs                     26.1                 h3a2ea38_1    conda-forge

Yet when trying to start either tmux or emacs, I get this error:

error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

Per error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory I have 5 libtinfo files:

(xenial)maxghenis@localhost:~$ sudo find / -name "libtinfo.so"
/home/maxghenis/miniconda3/pkgs/ncurses-5.9-10/lib/libtinfo.so
/home/maxghenis/miniconda3/pkgs/ncurses-6.1-hf484d3e_0/lib/libtinfo.so
/home/maxghenis/miniconda3/envs/tidycensus/lib/libtinfo.so
/home/maxghenis/miniconda3/lib/libtinfo.so

(xenial)maxghenis@localhost:/lib$ sudo find / -name "libtinfo.so.6"
/lib64/libtinfo.so.6

asked Jul 18, 2018 at 18:25

Max Ghenis's user avatar

Max GhenisMax Ghenis

14.1k13 gold badges77 silver badges125 bronze badges

7

Same issue. The following has worked out:

$ pwd
<anaconda_installation_dir>

$ ./bin/tmux
(error)


$ find . -name "libtinfo*"
...
./lib/libtinfo.so  # this is the needed shared lib shipped deployed by  conda, just need it been found
...

$ ln -s `readlink -f ./lib/libtinfo.so` `readlink -f ./lib/libtinfo.so | sed 's@libtinfo.so$@libtinfo.so.6@'`
$ find . -name "libtinfo*"
...
./lib/libtinfo.so  # original lib
./lib/libtinfo.so.6  # the new one which is a symlink
...

$ ./bin/tmux
(ok)

As to why this may be desired — my case is working in a sort of administratively «hostile» environment when I don’t have access to fast on-demand package deployment (as well as root/sudi as well, of course) but still need screen-like solution.

answered Dec 18, 2018 at 12:48

DimG's user avatar

DimGDimG

1,6011 gold badge16 silver badges22 bronze badges

You may need a package libncurses6. When you search for the library, you should look for files

find / -name "libtinfo.so*" -ls

The file libtinfo.so is only used when creating an executable, and is typically a symlink to the actual library. It is not needed to run a program. The file «libtinfo.so.6» is also often a symlink to the actual library. On my system, it is

/lib64/libtinfo.so.6 -> libtinfo.so.6.1

As tmux and emacs are system utilities and it’s not likely that you want to use different versions of them, why don’t you install them in the base system without conda?

answered Jul 30, 2018 at 20:08

RalfFriedl's user avatar

RalfFriedlRalfFriedl

1,1363 gold badges10 silver badges12 bronze badges

2

I am developing an Erlang-OTP application, for that I use a docker image.

docker-compose.yml:

FROM centos
LABEL Name=myimage Version=2.0.0

RUN set -e 
   && yum -y install 
      autoconf 
      gcc 
      gcc-c++ 
      git 
      glibc-devel 
      make 
      ncurses-devel 
      tar 
      curl


ENV SSL_VERSION="1.0.2p"

RUN set -e 
   && mkdir -p /tmp/openssl 
   && cd /tmp 
   && curl -fSL -o openssl.sha256   http://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz.sha256 
   && curl -fSL -o openssl.tar.gz http://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz 
   && SHA=$(printf "%s  openssl.tar.gz" `cat openssl.sha256` | sha256sum -c -); if [ "openssl.tar.gz: OK" != "${SHA}" ]; then exit 3; fi 
   && tar -zxf openssl.tar.gz -C /tmp/openssl --strip-components=1 
   && cd /tmp/openssl 
   && ./Configure 
         --prefix=/usr/local/ssl 
         --openssldir=/usr/local/ssl 
      linux-x86_64 
      shared 
   && make -j4 
   && make install 
   && rm -Rf /tmp/openssl*

ENV OTP_VERSION="20.3.6"
ENV WITH_NATIVE=true

RUN set -e 
   && mkdir -p /tmp/otp_src 
   && cd /tmp 
   && curl --tlsv1.2 -fSL -o otp_src.tar.gz https://github.com/erlang/otp/archive/OTP-20.3.6.tar.gz 
   && tar -zxf otp_src.tar.gz -C /tmp/otp_src --strip-components=1 
   && cd /tmp/otp_src 
   && ./otp_build autoconf 
   && ./configure 
         --prefix=/usr/local/otp 
         --enable-threads 
         --enable-smp-support 
         --enable-kernel-poll 
         --disable-dynamic-ssl-lib 
         --with-ssl=/usr/local/ssl 
         `test "${WITH_NATIVE}" = "true" && echo "--enable-hipe --enable-native-libs"` 
   && make -j4 
   && make install 
   && ln -s /usr/local/otp_${OTP_VERSION} /usr/local/otp 
   && rm -Rf /tmp/otp_src*

ENV PATH $PATH:/usr/local/otp/bin

RUN set -e 
   && yum -y install 
      which


ENV REBAR3_VERSION="3.6.1"

RUN set -xe 
    && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" 
    && REBAR3_DOWNLOAD_SHA256="40b3c85440f3235c7b149578d0211bdf57d1c66390f888bb771704f8abc71033" 
    && mkdir -p /usr/src/rebar3-src 
    && curl --tlsv1.2 -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" 
    && echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - 
    && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 
    && rm rebar3-src.tar.gz 
    && cd /usr/src/rebar3-src 
    && HOME=$PWD ./bootstrap 
    && install -v ./rebar3 /usr/local/bin/ 
    && rm -rf /usr/src/rebar3-src

RUN mkdir /myimage
WORKDIR /myimage

Commands to run docker-compose

sudo docker-compose build
sudo docker-compose run --rm myimage bash

When I try to run production tar created by Ubuntu-18.04, I get:

error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory.

I dont get any error while compiling. When I create this tar from Debian-9, it runs without error.

Debian machine has locally installed erlang-otp, but Ubuntu doesnt have.

Новые и опытные пользователи Linux могут сталкиваться с ошибкой error loading shared libraries во время запуска программ, также с ней могут сталкиваться программисты и все желающие компилировать программное обеспечение в своей системе. Эта ошибка в дословном переводе означает что возникла проблема во время загрузки общей библиотеки. О том что такое библиотеки и зачем они нужны вы можете узнать из статьи библиотеки Linux.

В этой же статье мы рассмотрим что значит ошибка error while loading shared libraries более подробно, а главное, как ее решить.

Даже если вы не компилируете свои программы, то вы можете увидеть ошибку error while loading shared libraries: имя_библиотеки: cannot open shared object file: No such file or directory достаточно часто во время установки новых программ не через пакетный менеджер или программ, предназначенных для другого дистрибутива. Как я уже говорил, она возникает потому, что система не может найти библиотеку.

А вот почему ее нельзя найти и загрузить, это уже интересно. Этому может быть несколько причин:

  • Библиотека не установлена в системе;
  • Библиотека установлена, но неизвестно куда;
  • Библиотека установлена правильно, но имеет не ту версию.

При решении проблемы мы будем руководствоваться именно этими причинами и пытаться их решить.

Как исправить ошибку?

1. Библиотека не установлена

Первый вариант, тут все понятно, библиотеки просто нет в системе, поэтому мы и получаем такую ошибку. Верный способ ее решения — просто найти пакет библиотеки с помощью пакетного менеджера и установить ее. Обычно, пакеты с библиотеками называются так же, как и сами библиотеки с префиксом lib.

Например, если нам не хватает библиотеки libfuse2.so, то мы можем найти ее в Ubuntu такой командой:

sudo apt search libfuse2

Затем осталось только установить ее:

sudo apt install libfuse2

Если перед вами стоит задача собрать программу из исходников, то вам понадобится не только установить саму библиотеку, но и заголовочные файлы для нее:

sudo apt install libfuse-dev

И так для любой библиотеки. Но это не всегда помогает.

2. Библиотека находится не в том каталоге

Бывает что библиотека установлена, мы установили ее или она поставлялась вместе с программой, но ошибка как была, так и есть. Причиной этому может быть то, что загрузчик Linux не может найти библиотеку.

Поиск библиотек выполняется по всех папках, которые указаны в конфигурационных файлах /etc/ld.conf.d/. По умолчанию, это такие каталоги, как /usr/lib, /lib, /usr/lib64, /lib64. Если библиотека установлена в другой каталог, то, возможно, это и есть причина проблемы.

Вы можете посмотреть какие библиотеки сейчас доступны загрузчику с помощью команды:

ldconfig -p

Найти, где находится ваша библиотека можно с помощью команды locate. Например, нас интересует библиотека librtfreader.so:

 locate librtfreader

Теперь мы знаем, что она находится по адресу /opt/kingsoft/wps-office/office6/. А значит, для работы программы необходимо сделать чтобы загрузчик библиотек ее видел. Для этого можно добавить путь в один из файлов /etc/ld.so.conf.d/ или же в переменную LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/opt/kingsoft/wps-office/office6/

Опять же, так вы можете поставить с любой библиотекой, которая взывает ошибку. Еще один более простой метод — это просто создать символическую ссылку на нужную библиотеку в правильной папке:

ln -s /opt/kingsoft/wps-office/office6/librtfreader.so /usr/lib/librtfreader.so

3. Неверная версия библиотеки

Эта причина ошибки довольно часто встречается при использовании программ не для вашего дистрибутива. Каждая библиотека имеет дополнительную версию, так называемую ревизию, которая записывается после расширения .so. Например, libav.so.1. Так вот, номер версии меняется всякий раз, когда в библиотеку вносятся какие-либо исправления.

Часто возникает ситуация, когда в одном дистрибутиве программа собирается с зависимостью от библиотеки, например, libc.so.1, а в другом есть только libc.so.2. Отличия в большинстве случаев здесь небольшие и программа могла бы работать на второй версии библиотеки. Поэтому мы можем просто создать символическую ссылку на нее.

Например, библиотеки libusb-1.0.so.1 нет. Но зато есть libusb-1.0.so.0.1, и мы можем ее использовать:

Для этого просто создаем символическую ссылку на библиотеку:

sudo ln -s /usr/lib/libusb-1.0.so.0.1 /usr/lib/libusb-1.0.so.1

В большинстве случаев программа не заметит подмены и будет работать, как и ожидалось. Также для решения этой проблемы можно попытаться найти нужную версию библиотеки в интернете для своей архитектуры и поместить ее в папку /usr/lib/ или /usr/lib64/. Но после этого желательно обновить кэш:

sudo ldconfig

Выводы

В этой статье мы рассмотрели почему возникает ошибка Error while loading shared libraries, а также как ее решить. В большинстве случаев проблема решается довольно просто и вы получите работоспособную программу. Надеюсь, эта информация была полезной для вас.

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

I’m having problems here as well with this.

Since Arduino upstream isn’t shipping their own libs for avrdude you get the problem with ‘libtinfo.so.5’ being absent since they assume that all distros have this lib already (…good job there).
Anyhow. If you read the wiki (like  you always should)

To use AVR boards such as the Arduino Uno you can install arduino-avr-core optionally to use archlinux upstream avr-gcc instead of the bundled older avr-core. If you still want to use the older arduino-core you need to install it in the board manager. You can always switch between the different cores in the «Tools>Board» menu.

This makes sure you have the definitions (or whatever they are) for most boards.

The problem I’ve run into is that the Archlinux packages assume ‘arduino-builder’ as the uploader. And ‘arduino-builder’ assumes that you provide a tool folder, as is said on the wiki ( https://wiki.archlinux.org/index.php/ar … no-Builder ).
And what is the problem with this? When pressing the ‘upload’ or ‘compile’ buttons in the Arduino IDE you get

Arduino: 1.8.0 (Linux), Board: "Arduino/Genuino Uno"

/usr/share/arduino/arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -built-in-libraries /usr/share/arduino/libraries -libraries /home/chewtoy/Arduino/libraries -fqbn=archlinux-arduino:avr:uno -vid-pid=0X2341_0X0001 -ide-version=10800 -build-path /tmp/arduino_build_951808 -warnings=none -prefs=build.warn_data_percentage=75 -verbose /home/chewtoy/code/GitHub/Keyboard/Code/ModuleA/ModuleA.ino
Parameter 'tools' is mandatory
Usage of /usr/share/arduino/arduino-builder:
  -build-options-file string
    	Instead of specifying --hardware, --tools etc every time, you can load all such options from a file
  -build-path string
    	build path
  -built-in-libraries value
    	Specify a built-in 'libraries' folder. These are low priority libraries. Can be added multiple times for specifying multiple built-in 'libraries' folders
  -compile
    	compiles the given sketch
  -core-api-version string
    	version of core APIs (used to populate ARDUINO #define) (default "10600")
  -debug-level int
    	Turns on debugging messages. The higher, the chattier (default 5)
  -dump-prefs
    	dumps build properties used when compiling
  -fqbn string
    	fully qualified board name
  -hardware value
    	Specify a 'hardware' folder. Can be added multiple times for specifying multiple 'hardware' folders
  -ide-version string
    	[deprecated] use 'core-api-version' instead (default "10600")
  -libraries value
    	Specify a 'libraries' folder. Can be added multiple times for specifying multiple 'libraries' folders
  -logger string
    	Sets type of logger. Available values are 'human', 'machine' (default "human")
  -prefs value
    	Specify a custom preference. Can be added multiple times for specifying multiple custom preferences
  -preprocess
    	preprocess the given sketch
  -quiet
    	if 'true' doesn't print any warnings or progress or whatever
  -tools value
    	Specify a 'tools' folder. Can be added multiple times for specifying multiple 'tools' folders
  -verbose
    	if 'true' prints lots of stuff
  -version
    	prints version and exits
  -vid-pid string
    	specify to use vid/pid specific build properties, as defined in boards.txt
  -warnings string
    	Sets warnings level. Available values are 'none', 'default', 'more' and 'all'

Error compiling for board Arduino/Genuino Uno.

And there is no option to specify what options  to give ‘arduino-builder’. Unless there is some hidden setting in ‘~/.arduino15/preferences.txt’ that’s not there by default.
So going by the wiki and only using packages from community, the ‘upload’ and ‘compile’ is broken in the Arduino package, I’d say.
Compiling from command line using arduino-builder seems to work though, given the mandatory flags ofc.

Last edited by chewtoy (2017-01-05 09:54:13)

LAAT501legion


  • Add bookmark

  • #1

Short summary of your issue
Game fails to start up (Ubuntu Linux)

Game Version
1.0.3

What OS are you playing on?
Linux

Do you have mods enabled?
No

Have you tried verifying your game files?
Yes

How much «pain» is this causing you?
10

Please explain the issue you experienced in the most condensed way possible
The game fails to start up and throws the following error message:

ERROR: ld.so: object ‘/home/jairsan/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so’ from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object ‘/home/jairsan/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so’ from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
./victoria3: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

I tried the launcher (versions 2022.6 and 2022.12) as well as manually executing the binary. File verification and re-installing the launcher did not seem to fix it.

Please explain how to reproduce the issue
Ubuntu 18.04

Is there anything else you think could help us identify/replicate the issue?

I have attached a save game


No

Upload Attachment
File(s) attached

  • Screenshot from 2022-10-25 20-45-21.png

    Screenshot from 2022-10-25 20-45-21.png

    1 MB · Views: 0

Last edited: Oct 25, 2022

  • 1Like

Reactions:

ThePastfinder


  • Add bookmark

  • #2

Same problem and message. But it turns out I can’t run the game anyway since I’m still on a AM2+ socket cpu which doesn’t have this AVX thing I’ve never heard of before. Not sure if that’s the cause of this message in particular though. You got an old CPU?

LAAT501legion


  • Add bookmark

  • #3

Same problem and message. But it turns out I can’t run the game anyway since I’m still on a AM2+ socket cpu which doesn’t have this AVX thing I’ve never heard of before. Not sure if that’s the cause of this message in particular though. You got an old CPU?

Ryzen 2600, in theory it supports AVX2.

  • Add bookmark

  • #4

you are missing libtinfo6 on your system. you should try to install that.
https://packages.ubuntu.com/jammy/libtinfo6 (could be the right one, but as i am not on ubuntu i can not verity that)

edit: dont get confused with the ld error. that has every game on steam on linux, as steam tries to inject both versions (32bit and 64bit) as steam overlay. one of them will ofc fail, as its not matching the architecture. but its a classical to ignore error. the interesting one is the «error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory»

Last edited: Oct 25, 2022

SeekTruthFromFx


  • Add bookmark

  • #5

you are missing libtinfo6 on your system. you should try to install that.
https://packages.ubuntu.com/jammy/libtinfo6 (could be the right one, but as i am not on ubuntu i can not verity that)

OP is on Ubuntu 18.04 Focal Fossa, so you should install the Focal version of libtinfo6 (sudo apt install libtinfo6).

However, note that the minimum supported version of Ubuntu is 20.04, which uses a more recent version of libtinfo6 (the Jammy one linked by Shawn8901 above).

You might find that the rest of Focal is incompatible with Jammy libtinfo6, or you might find that Victoria 3 is incompatible with Focal libtinfo6.

LAAT501legion


  • Add bookmark

  • #7

Thanks to everyone that replied, you were indeed right, upgrading to Ubuntu 20.04 solved the problem. Apologies for taking so long to reply, once I got the game working there was little time for anything else ;)

  • 1Haha

Reactions:

TuxМногие пользователи Linux рано или поздно сталкиваются с ошибкой error while loading shared libraries. Как правило, при установке программ вручную. Сегодня поговорим об исправлении данной ошибки. Для примера возьмём старый ноутбук с Ubuntu 14.04 LTS, поддержка которой недавно закончилась, а значит что-то приходится доустанавливать вручную.

Ошибка error while loading shared libraries означает, что программа, которую пользователь пытается запустить, не смогла найти необходимую для своего запуска библиотеку. Такое часто случается, если программа устанавливалась не из репозиториев, а вручную. Например, на скриншоте ниже мы видим, что свежая версия Mozilla Firefox требует для своей работы библиотеку libatomic.so.1, но не может её обнаружить.

Ошибка error while loading shared libraries в Linux

При этом, кстати, совершенно не обязательно, что данная библиотека отсутствует в системе. Поэтому сперва выполним поиск библиотеки (подробнее о locate в статье по этой ссылке):

locate *libatomic*

Естественно, в Вашем случае библиотека может называться иначе. Смотрите, что упоминается в тексте ошибки.

Если команда ничего не выдаст, это значит, что библиотеки в системе нет (а вот если библиотека найдена, тогда об этом ниже).

Поищем библиотеку в репозиториях:

sudo apt search libatomic

В результате мы получим перечень пакетов, которые в названии содержат libatomic:

Ошибка error while loading shared libraries в Linux

В моем случае речь идёт о стареньком ноутбуке с 32-битной системой, поэтому мой выбор пал на libatomic1. Если Вы собираете программу из исходников, то будет полезным поставить не только библиотеку, но и заголовочные файлы с приставкой -dev. Сама установка проста:

sudo apt install libatomic1

Ошибка error while loading shared libraries в Linux

В результате — актуальная версия Firefox в уже не поддерживаемой разработчиками Ubuntu (подробнее об установке новых версий Firefox в старых релизах Ubuntu в статье по ссылке).

Ошибка error while loading shared libraries в Linux

Кстати, иногда команда locate может не выдать Вам информацию о библиотеке, так как, на самом деле она не осуществляет поиск файлов или каталогов. Но это отдельный разговор. Посмотреть, установлена ли библиотека в системе, можно и при поиске пакетов в репозитории. Как видите, наш пакет libatomic1 теперь помечен как установленный.

Ошибка error while loading shared libraries в Linux

Теперь о том, что делать, если библиотека есть в системе, но ошибка error while loading shared libraries всё равно появляется. Очень часто причиной этого является то, что загрузчик ОС не может найти библиотеку. По умолчанию поиск производится в каталогах: /usr/lib, /lib, /usr/lib64, /lib64. Не исключено, что библиотека просто лежит за пределами этих каталогов.

Вариантов тут несколько: переместить или скопировать библиотеку, ну или же указать загрузчику, где её искать. Последний способ более корректный, так как при нём Вы точно ничего не напортачите в системе.

Можно зайти в папку /etc/ld.so.conf.d/, открыть там любой конфигурационный файл и просто прописать местонахождение нужной библиотеки.

А можно сделать символьную (символическую) ссылку:

ln -s [путь_к_библиотеке/имя_библиотеки] /usr/lib/[имя_библиотеки]

Есть ещё одна причина ошибки while loading shared libraries даже когда нужна библиотека имеется в операционной системе. Библиотека может быть не той версии.

Версия библиотеки (или ещё её называют ревизией) пишется после расширения .so. В нашем примере нам требовалась библиотека libatomic.so.1, т.е. libatomic первой версии.

В разных дистрибутивах используются разные версии библиотек, а программы собираются под дистрибутив (и, как следствие, библиотеку конкретной версии). На практике же различия между версиями библиотек чаще всего минимальны. Поэтому для начала можно выдать библиотеку одной версии за библиотеку другой версии. В этом нам опять поможет символьная ссылка:

ln -s [путь_к_библиотеке/настоящее_имя_библиотеки] [путь_к_библиотеке/имя_библиотеки_с_нужной_версией]

Если этот способ не помог, то выход один — искать библиотеку нужной версии.

И последнее: после манипуляций с библиотеками желательно обновить кэш командой

sudo ldconfig

Вот, пожалуй, и всё, что нужно знать про ошибку error while loading shared libraries.

Понравилась статья? Поделить с друзьями:
  • Error while loading shared libraries libssl so
  • Error while loading shared libraries libqtgui so 4
  • Error while loading shared libraries libqtcore so 4
  • Error while loading shared libraries libqt5sql so 5
  • Error while loading shared libraries libpq so 5