How to install Qgis 3.0.x in Ubuntu 18.04
If you try to install from repositories, you will install version 2.18
To install the lastest version, you can download it from git, but first you need to install dependencies.
If you have Ubuntu 18.04 you need the following packages:
sudo apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex gdal-bin git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libosgearth-dev libpq-dev libproj-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqt5opengl5-dev libqt5scintilla2-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libzip-dev lighttpd locales ninja-build pkg-config poppler-utils pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb
If you have another distribution, you can search the dependencies here
Now, install qgis:
wget https://github.com/qgis/QGIS/archive/final-3_0_2.tar.gz
tar xzvf final-3_0_2.tar.gz
cd QGIS-final-3_0_2
mkdir build
cd build
cmake ..
make -j8
sudo make install
cd output/bin/
./qgis
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007f470edd6340 (most recent call first):
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 114 in __makeattr
File "~/QGIS-final-3_0_2/build/output/python/qgis/utils.py", line 664 in _import
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 48 in importobj
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 125 in __makeattr
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 143 in __dict__
...
[1] 27120 abort (core dumped) ./qgis
This issue happends when you try to run qgis from the source folder.
Open a new terminal (to reload the path where qgis is installed) and run qgis.
Enjoy it!
To install the lastest version, you can download it from git, but first you need to install dependencies.
If you have Ubuntu 18.04 you need the following packages:
sudo apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex gdal-bin git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libosgearth-dev libpq-dev libproj-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqt5opengl5-dev libqt5scintilla2-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libzip-dev lighttpd locales ninja-build pkg-config poppler-utils pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb
If you have another distribution, you can search the dependencies here
Now, install qgis:
wget https://github.com/qgis/QGIS/archive/final-3_0_2.tar.gz
tar xzvf final-3_0_2.tar.gz
cd QGIS-final-3_0_2
mkdir build
cd build
cmake ..
make -j8
sudo make install
cd output/bin/
./qgis
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007f470edd6340 (most recent call first):
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 114 in __makeattr
File "~/QGIS-final-3_0_2/build/output/python/qgis/utils.py", line 664 in _import
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 48 in importobj
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 125 in __makeattr
File "/usr/local/lib/python3.5/dist-packages/py/_apipkg.py", line 143 in __dict__
...
[1] 27120 abort (core dumped) ./qgis
This issue happends when you try to run qgis from the source folder.
Open a new terminal (to reload the path where qgis is installed) and run qgis.
Enjoy it!
Thank you very much for your blog post. Worked for Ubuntu 16.04.4 too!
ReplyDeleteThanks a lot, I had had this problem since 3 weeks ago , you saved me :D
ReplyDelete