7

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!

AEM
  • 1,156
  • 2
  • 14
  • 19

4 Answers4

10

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
wyphan
  • 367
6

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
Alex'LP
  • 91
1

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

1

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

Pilot6
  • 92,041