Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Qt 4 ubuntu 17.04

Tags:

linux

qt

I need to install Qt 4 in my computer to run a specific software. I've download Qt 4.8.6 from: https://download.qt.io/archive/qt/4.8/4.8.6/. I followed the steps from the link http://doc.qt.io/qt-4.8/install-x11.html, but after I use make (step 3) I received the message:

Makefile:1624: recipe for target 'obj/release/pcre_exec.o' failed
make[1]: * [obj/release/pcre_exec.o] Error 1
make[1]: Leaving directory '/usr/lib/qt/src/script'
Makefile:602: recipe for target 'sub-script-make_default-ordered' failed
make: *
[sub-script-make_default-ordered] Error 2

I've already tried this recomendations from the software (that I want to install after installed Qt4), and I stop at the same make command.

Installation example (bash notation):

VERS="4.x.y" # Set Qt version number

SRCDIR="${HOME}/src" # Set path for source files
mkdir $SRCDIR
cd $SRCDIR
SRC="http://origin.releases.qt-project.org/qt4/source"
wget -N $SRC/qt-everywhere-opensource-src-$VERS.tar.gz
tar -xzvf qt-everywhere-opensource-src-$VERS.tar.gz
cd qt-everywhere-opensource-src-$VERS

INSTDIR="/usr/local"

PLATFORM="linux-g++-64"

O1="-release -opensource -static"
O2="-qt-zlib -no-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg"
NO="-nomake examples -nomake demos -nomake docs -nomake translations"
./configure $O1 $O2 $NO -prefix $INSTDIR/qt_$VERS -platform $PLATFORM # Confirm the license agreement

Someone knows how to proceed? Thanks.

like image 645
Rodrigo Mendes da Rocha Avatar asked Nov 24 '17 03:11

Rodrigo Mendes da Rocha


1 Answers

Ubuntu 17.04 has it in repositories:

sudo apt install qt4-default
like image 117
Velkan Avatar answered Nov 05 '22 20:11

Velkan