gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

chat: error while loading shared libraries: libjpeg.so.8

Open MartinKei opened this issue 1 year ago • 7 comments

Problem

chat command fails due to error while loading shared library libjpeg.so.8.

> ./chat 
./chat: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

Environment

Fedora Linux 36 Intel machine

I have installed libjpeg-turbo and I installed a old version of libjpeg 8 to have the library

> ls /lib | grep libjpeg
libjpeg.so
libjpeg.so.62
libjpeg.so.62.3.0
libjpeg.so.8
libjpeg.so.8.2.2

MartinKei avatar Apr 14 '23 08:04 MartinKei

Same for RHEL 8

carias-rh avatar Apr 14 '23 14:04 carias-rh

Same on Nobara 37

kurushimee avatar Apr 15 '23 08:04 kurushimee

@all guys,

I am good on Ubuntu22.04, but here is my suggestion

  1. first run sudo find / -name libjpeg.so, if you have libjpect.so installed anywhere
  2. you need to add LD_LIBRARY_PATH=/usr/local/lib:/usr/lib to ~/.bashrc if LD LIB PATH is not set out there.
  3. Otherwise, try run apt-cache search libjpeg and find one to install (but I am not sure which jpeg lib to install)

yhyu13 avatar Apr 15 '23 10:04 yhyu13

@iver seems you solved it https://github.com/nomic-ai/gpt4all/issues/361

yhyu13 avatar Apr 15 '23 10:04 yhyu13

@iver0 Yes, installing libjpeg8 from the source aflyhorse/libjpeg does really fix it. I've downloaded a RPM from here: https://openmandriva.pkgs.org/cooker/openmandriva-main-release-x86_64/libjpeg8-2.1.5.1-1-omv2390.x86_64.rpm.html

This one did not work. Not sure why.

But I'm wondering why it does not work with libturbojpeg - which is the default for Fedora.

MartinKei avatar Apr 18 '23 06:04 MartinKei

I got the same error on Kali Linux and Debian.Anyone has a fix for this?

FlyingRino avatar May 04 '23 07:05 FlyingRino

Guys i found the fix for Debian/Kali Linux:

Download and install this : http://security.debian.org/debian-security/pool/updates/main/g/glibc/multiarch-support_2.28-10+deb10u2_amd64.deb

Download and install this : https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d-1+deb7u1_amd64.deb

and then fix also the error: error while loading shared libraries: libxcb-cursor.so.0: cannot open shared object file: No such file or directory

Fix: sudo apt-get install libicu-dev sudo apt-get install libxcb-cursor-dev

FlyingRino avatar May 04 '23 07:05 FlyingRino

Seems solved

niansa avatar Aug 11 '23 11:08 niansa