epson-printer-utility error loading shared libraries

8,402

Solution 1

Ubuntu 20.04 LTS no longer has Qt4 libraries on purpose. See this question, for instance. Your best bet is compiling from source, or setting up a virtual machine with an older Ubuntu version as the guest OS.

Or, if you're feeling adventurous, you can add this PPA, then install Qt4:

sudo apt-add-repository ppa:rock-core/qt4
sudo apt update
sudo apt install qt4-default

This removes qt5-default from your system. Let's add it back:

sudo apt install qt5-default

Now you have both Qt4 and Qt5 libraries installed in your system in a fragile balance. The Qt4 libraries will be removed the next time you run sudo apt autoremove to clean up installed packages. Let's prevent that from happening:

sudo apt install libodbc1 libqt4-dbus libqt4-declarative libqt4-designer libqt4-dev libqt4-dev-bin libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-odbc libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtdbus4 libqtgui4 qdbus qt4-linguist-tools qt4-qmake qtcore4-l10n

Solution 2

The following worked for me on Ubuntu 20.10 for epson-printer-utility_1.1.1-1lsb3.2_amd64.deb

Download the following bionic packages:
http://mirrors.kernel.org/ubuntu/pool/universe/q/qt4-x11/libqtcore4_4.8.7+dfsg-7ubuntu1_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/q/qt4-x11/libqtgui4_4.8.7+dfsg-7ubuntu1_amd64.deb

Extract from them the following files:

libQtCore.so.4.8.7
libQtGui.so.4.8.7

Copy these two files to /usr/lib/x86_64-linux-gnu. Assuming that folder with the files mentioned above is current folder in terminal:

sudo cp libQtCore.so.4.8.7 /usr/lib/x86_64-linux-gnu/
sudo cp libQtGui.so.4.8.7 /usr/lib/x86_64-linux-gnu/

Make appropriate symbolic links in /usr/lib/x86_64-linux-gnu:

cd /usr/lib/x86_64-linux-gnu/
sudo ln -s libQtCore.so.4.8.7 libQtCore.so.4
sudo ln -s libQtGui.so.4.8.7 libQtGui.so.4

The above makes Epson Printer Utility up and running. But its functionality is... Well, it is disappointing. All the functions provided can be performed on the device itself.
Epson Printer Utility main window

N.B. The following message does not seem to harm the application.

Gtk-Message: Failed to load module "overlay-scrollbar"

It can be fixed by installation of overlay-scrollbar-gtk2 package:

sudo apt install overlay-scrollbar-gtk2

Solution 3

You can download the libqt4 packages for the previous release, extract them, and tell epson-printer-utility to use them by setting LD_LIBRARY_PATH. I made a script:

https://gist.github.com/derde/025a1cdbfadc3e56dc6a46093d922c32

#! /bin/bash
  
  # Run epson-printer-utility from epson-printer-utility_1.0.2-1lsb3.2_amd64.deb
  # using downloaded libqt4 libraries from previous Ubuntu version (not provided
  # in Ubuntu 20.04 "focal fossa"
  #
  # This downloads the deb files and extracts them in a libs directory in the
  # current directory, and then runs the utility
  #
  # Fix for:
  # epson-printer-utility: error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory
  
  DEBS='
      http://mirrors.kernel.org/ubuntu/pool/universe/q/qt4-x11/libqtgui4_4.8.7+dfsg-7ubuntu3_amd64.deb
      http://mirrors.kernel.org/ubuntu/pool/universe/q/qt4-x11/libqtcore4_4.8.7+dfsg-7ubuntu3_amd64.deb
  '
  cd `dirname $0`
  mkdir -p libs
  cd libs
  
  echo "## `pwd`"
  if ! [ -f data.tar.zx ] ; then
      for DEB in $DEBS; do
          FILE="${DEB/*\/}"
          [ -f "$FILE" ] && continue
          echo "## download $DEB"
          wget $DEB
          echo "## extract $FILE"
          ar x $FILE
          tar -xJf data.tar.xz
          rm control.tar.xz  data.tar.xz debian-binary
      done
  fi
  
  echo "## run epson-printer-utility with `pwd`"
  LD_LIBRARY_PATH=`pwd`/./usr/lib/x86_64-linux-gnu epson-printer-utility

Solution 4

I fixed this problem without using a PPA.

I downloaded three packages from bionic repo:

libqtcore4_4.8.7+dfsg-7ubuntu1_amd64.deb
libqtgui4_4.8.7+dfsg-7ubuntu1_amd64.deb
libaudio2_1.9.4-6_amd64.deb

and extracted these files using Archive manager:

libQtCore.so.4
libQ4Core.so.4.8.7
libQtGui.so.4
libQtGui.so.4.8.7
libaudio.so.2

then copied all 5 files to /usr/lib/x86_64-linux-gnu

Share:
8,402

Related videos on Youtube

nomorewin
Author by

nomorewin

Trying to defect from M$ Windows

Updated on September 18, 2022

Comments

  • nomorewin
    nomorewin over 1 year

    When trying to run the printer utility I downloaded from Epson website I get the following error:

    epson-printer-utility: error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory
    

    I presume this is because the QT4 libraries aren't installed on Ubuntu 20.04 LTS. And it seems no longer available to install.

    I have googled and tried installing various QT4 libraries by various means without success. For example:

    $ sudo apt-get install qt4-default
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package qt4-default is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package 'qt4-default' has no installation candidate
    

    Help please.

    I'm new to linux so be kind and very specific with what I need to do!

  • nomorewin
    nomorewin almost 4 years
    Thanks for this. One step forward. But another error now... epson-printer-utility: error while loading shared libraries: libaudio.so.2: cannot open shared object file: No such file or directory
  • user6031769
    user6031769 almost 4 years
    See if you can get another copy of epson-printer-utility_1.0.2-1lsb3.2_amd64.deb I got one from here ... download.ebz.epson.net/dsc/search/01/search/searchModule It does not link to libaudio.so.2, as shown by ldd /opt/epson-printer-utility/bin/epson-printer-utility
  • ppom
    ppom over 3 years
    I don't have enough reputation to answer to @user6031769, so I'll answer here. libaudio.so.2 is required by the libs/usr/lib/x86_64-linux-gnu/libQtGui.so.4 dowloaded by the script. I could not find answer on where to find this shared library with a quick search on the internet.
  • Zanna
    Zanna over 3 years
    @ppom thanks for the useful comment! You can ask a new question about this if you don't get a response here - just add a link to this post in your question.
  • nomorewin
    nomorewin over 3 years
    I had to extract and copy libaudio.so.2.4 too. But on running the epson utility I get:epson-printer-utility: error while loading shared libraries: libaudio.so.2: wrong ELF class: ELFCLASS32 Any idea how to fix that please?
  • nomorewin
    nomorewin over 3 years
    Actually the ELF class error was probably because I downloaded that archive for Ubuntu 20.04. I found libaudio2_1.9.4-6_amd64.deb for 18.04 and now I get another error: Failed to load module "canberra-gtk-module" At this rate I'm going to go back to using Windows 10. Help please!
  • Pilot6
    Pilot6 over 3 years
    You need to download all packages for 18.04.
  • minmax
    minmax almost 3 years
    To solve this problem I only had to install libqtcore4 and libqtgui4 using sudo apt install libqtcore4 libqtgui4
  • Geppettvs D'Constanzo
    Geppettvs D'Constanzo over 2 years
    This is the only solution which worked for an Epson Eco-Tank L1110 in order to properly run the epson-printer-utility. Thank you
  • wyphan
    wyphan over 2 years
    @GeppettvsD'Constanzo I have an EcoTank ET-2720 myself. Glad to help!
  • tstanisl
    tstanisl over 2 years
    worked for old Epson L355
  • apolinux
    apolinux about 2 years
    this solution worked for me, but I also had to download libaudio package from archive.ubuntu.com/ubuntu/pool/main/n/nas/… and repeat the copy libaudio process to the same dir. By the way, I'm on ubuntu 21.10.