Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu Installation Steps (Tested with ubuntu 14.04 64bit and pgmodeler-0.8.1-alpha) #674

Closed
sgon00 opened this issue Apr 16, 2015 · 8 comments

Comments

@sgon00
Copy link

sgon00 commented Apr 16, 2015

It took me half a day to figure out how to install and compile pgmodeler in my ubuntu 14.04 64bit OS. I met many problems including failure to install qt5-default and many compilation errors. I think it's better to share my installation steps with others so they don't need to go through my pain.

My Environment: ubuntu 14.04 LTS 64bit and pgmodeler-0.8.1-alpha.

Update Your Ubuntu System

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Install Dependencies

I assume you have already installed and setup _postgresql server_.

Install qt5 framework:

$ sudo apt-get install qt5-default

If you meet unmet dependencies error by running the above command, you may need to install libgles2-mesa-dev manually first. I opened a bug for this issue.

Install Other dependencies:

$ sudo apt-get install libpq-dev libxml2-dev qttools5-dev-tools clang qt5-image-formats-plugins libqt5svg5

Untar The Source Code and Modify linuxdeploy.sh Installation Script

$ tar -xzvf pgmodeler-0.8.1-alpha.tar.gz

It's VERY IMPORTANT to rename the directory name. The directory name has to be the same as pgmodeler.pro, otherwise qmake will report USAGE error:

$ mv -i pgmodeler-0.8.1-alpha pgmodeler
$ cd pgmodeler

Modify linuxdeploy.sh Installation Script as follows:

$ diff linuxdeploy.sh linuxdeploy-ubuntu.sh 
107a108
>   DEP_PLUGINS_ROOT="/usr/lib/x86_64-linux-gnu/qt5"
120,128c121,130
<   QT_LIBS="libQt5DBus.so.5 \
<            libQt5PrintSupport.so.5 \
<            libQt5Widgets.so.5 \
<            libQt5Network.so.5 \
<            libQt5Gui.so.5 \
<            libQt5Core.so.5 \
<            libicui18n.so.5* \
<            libicuuc.so.5* \
<            libicudata.so.5*"

---
>   QT_LIB_ROOT="/x86_64-linux-gnu"
>   QT_LIBS="$QT_LIB_ROOT/libQt5DBus.so.5 \
>            $QT_LIB_ROOT/libQt5PrintSupport.so.5 \
>            $QT_LIB_ROOT/libQt5Widgets.so.5 \
>            $QT_LIB_ROOT/libQt5Network.so.5 \
>            $QT_LIB_ROOT/libQt5Gui.so.5 \
>            $QT_LIB_ROOT/libQt5Core.so.5 \
>            $QT_LIB_ROOT/libicui18n.so.5* \
>            $QT_LIB_ROOT/libicuuc.so.5* \
>            $QT_LIB_ROOT/libicudata.so.5*"
258c263
<    cp $QT_ROOT/plugins/$plug $DEP_PLUGINS_DIR/$pdir >> $LOG 2>&1

---
>    cp $DEP_PLUGINS_ROOT/plugins/$plug $DEP_PLUGINS_DIR/$pdir >> $LOG 2>&1

Compile The Source Code

Since I modified the installation script, I changed the script name:

$ ./linuxdeploy-ubuntu.sh

Run The Program

$ cd build/opt/pgmodeler/
$ ./start-pgmodeler.sh

Finish.

@COLABORATI
Copy link

Thank you very much! Now, as the compile works, I feel motivated to dig deeper into this software. This should be added to the install instructions wiki page.

@nickguletskii
Copy link

No need to do any modifications to linuxdeploy.sh. Just add the -no-qt-libs flag!

@SteveViss
Copy link

Thanks for this doc... pretty clear ! Tested on Ubuntu 15.10 and pgmodeler-0.8.1

@lucas85cunha
Copy link

--> Someone, what I'm missing?
pgModeler Linux deployment script
PostgreSQL Database Modeler Project - pgmodeler.com.br
Copyright 2006-2016 Raphael A. Silva raphael@pgmodeler.com.br

[Deploying version: 0.8.2-beta1
Cleaning previous compilation...
Running qmake...

** Failed to execute qmake with arguments '-r -spec linux-clang PREFIX=/opt/pgmodeler BINDIR=/opt/pgmodeler PRIVATEBINDIR=/opt/pgmodeler PRIVATELIBDIR=/opt/pgmodeler/lib LANGDIR=/opt/pgmodeler/lang SAMPLESDIR=/opt/pgmodeler/samples SCHEMASDIR=/opt/pgmodeler/schemas PLUGINSDIR=/opt/pgmodeler/plugins CONFDIR=/opt/pgmodeler/conf DOCDIR=/opt/pgmodeler SHAREDIR=/opt/pgmodeler TEMPDIR=/opt/pgmodeler/tmp']

--> And the script stopped.

@eggmatters
Copy link

I kept getting comilation errors "usr/lib/postgresql/9.5/lib/libpq.so not found"
For ubuntu, This was located in: /usr/lib/x86_64-linux-gnu/libpq.so.

In the installation wiki Update the directions for /usr/lib/pkgconfig/libpq.pc to the following:

prefix=/usr
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/postgresql

if not installed, run sudo apt-get install libpq-dev

@gescobedo
Copy link

@lucas85cunha maybe you should check log files, in my case I missed to install svg library

@yalopov
Copy link

yalopov commented Dec 4, 2016

@gescobedo Hi, how did you solve svg error? i tried installing libqt5svg5 package but it doesn't works

Nevermind, installing libqt5svg5-dev solved it.

@gescobedo
Copy link

@hades check the log file And make sure that the libraries are in the right path the installer should output all the things that are failing to run

@rkhaotix rkhaotix closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants