6

I did all that the qgis page says. Install ELGIS. after that i investigate and tried different commands.. but nothing works..the last I tried was:

yum --enablerepo=elgis install qgis

this was the response:

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.edatel.net.co
 * epel: mirror.symnds.com
 * extras: mirror.edatel.net.co
 * rpmfusion-free-updates: mirror.hiwaay.net
 * updates: mirror.edatel.net.co
Setting up Install Process
No package qgis available.

seems just with centos this is complicated!

0

2 Answers 2

3

You'd have to install the repository first

sudo rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm

Then to install QGIS

sudo yum install qgis qgis-python qgis-grass qgis-mapserver

or try this

sudo yum --enablerepo=elgis install qgis qgis-grass qgis-python qgis-mapserver

If that still doesn't work, could you try searching for it in the repository?

su -c 'yum search qgis'

and see what the actual package names are.

4
  • really thank you for response!!! but no.... I get the same answer; with the 2 options and yes, I had installed the repository in first place... Setting up Install Process No package qgis available. No package qgis-grass available. No package qgis-python available. No package qgis-mapserver available. Error: Nothing to do
    – Antonio
    Commented Oct 19, 2012 at 12:27
  • Updated answer. Could you do a search?
    – R.K.
    Commented Oct 20, 2012 at 5:25
  • Sure: "yum search qgis" after having the repo enabled.
    – markusN
    Commented Oct 20, 2012 at 14:44
  • What's the output?
    – R.K.
    Commented Oct 20, 2012 at 16:13
2

If you're willing to do the compiling yourself, then you might follow my instructions here. (EDIT: pasted to avoid linkrot)

We’ll assume you already have a build environment with gcc-c++, flex, bison, PyQt4 etc. Check the QGIS wiki wiki page for details regarding dependencies. While the instructions are specific for Ubuntu systems, it’s fairly clear which parallel packages you will need to install on SL6. Also you will want to install the whole geospatial stack, all from standard repos or the EPEL and elgis repos. This includes geos, proj, grass-6.4.2, gdal-1.8.1 and all the -devel packages as well.

Download the source code for QGIS and untar in a directory of your choice. Before starting the configure and make steps there’s one simple edit required for EL6 and similar: under the python directory open the file CMakeLists.txt. You’ll find four lines like:

SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.core.api)

These are lines 64, 80, 94, 100

You need to remove the “-o” option from each. This is a flag for “sip” which handles bindings between c++ and python. This new flag was introduced in recent versions of sip, and it’s not available in the EL6 sip packages. Removing the extra flag has no ill effects on the compilation (I believe it’s only applicable to the comments in the source code). So each of the four lines should be:

SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -a ${CMAKE_BINARY_DIR}/python/qgis.core.api)

If you prefer to make the above changes with ‘patch’ here’s a diff file provided by Volker Froehlich (Fedora GIS maintainer). Now, following more or less the instructions from that same wiki page above, you create a subdirectory “build’, drop into that directory and run:

$ cmake -L -DGRASS_PREFIX=/usr/grass-6.4.2 -DGDAL_LIBRARY=/usr/lib64/libgdal.so ..

(Don’t skip the two dots .. at the end of the command)

The two specific directives to the cmake command indicate where the GRASS installation and libgdal are. These paths are based on GRASS and GDAL being installed from RPM’s. If you’ve cooked your own GRASS or GDAL, set the above appropriately. Now you’re ready to go:

$ make
$ sudo make install

One more step is required so that QGIS can “find” the GRASS libraries. Add a one line file into /etc/ld.so.conf.d which contains:

$ cat /etc/ld.so.conf.d/grass.conf
/usr/grass-6.4.2/lib

and do: sudo ldconfig

Now you should be ready to enjoy the new, updated QGIS 1.8.0 ‘Lisboa’

It's for Scientific Linux 6, but should be identical on CentOS 6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.