Skip to content

Instantly share code, notes, and snippets.

@derde
Created June 27, 2020 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save derde/025a1cdbfadc3e56dc6a46093d922c32 to your computer and use it in GitHub Desktop.
Save derde/025a1cdbfadc3e56dc6a46093d922c32 to your computer and use it in GitHub Desktop.
Run epson-printer-utility_1.0.2-1lsb3.2_amd64.deb under ubuntu focal, providing missing libQtCore4
#! /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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment