2

I just switched from Windows to Ubuntu. Now I'm trying to install GRASS GIS 7.0 (beta, upcoming stable) packages on Ubuntu 14.04 following the instructions given here. But I'm getting this error

grass70 : Depends: grass70-core but it is not going to be installed
grass70-gui : Depends: grass70-core but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I wonder how to resolve this issue. Any help will be highly appreciated. Thanks

Edited

I also tried the following instructions but no luck:

sudo add-apt-repository ppa:grass/grass-stable
sudo apt-get update
sudo apt-get -f install
sudo apt-get clean
sudo apt-get -f install
sudo apt-get install grass70 grass70-gui
1
  • Grass-7.0 is a beta version and I am not sure that all the needed packages are included in the external repository. I advise you to install the native package of your ubuntu version. Aug 13, 2014 at 14:41

4 Answers 4

2

Unfortunately, GRASS GIS development version package for 7.0 is not in a good shape now. I would suggest to compile GRASS GIS from the source code. (Edit: GRASS GIS 7.0 was released, so situation is different; this was valid for September 2014, however the compilation can be advantageous anyway.)

You need to install compile tools and dependencies, download source code using SVN, configure, compile and install.

The steps are described here:

http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu

Go through the sections:

  • Dependencies
  • Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL
  • Compile from source, subsection GRASS GIS

Here are the actual steps (partially mine, partially extracted from the wiki page):

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install \
  build-essential \
    flex make bison gcc libgcc1 g++ cmake ccache \
    python python-dev \
    python-opengl \
    python-wxversion python-wxtools python-wxgtk2.8 \
    python-dateutil libgsl0-dev python-numpy \
    wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \
    libwxbase2.8-dev  libwxbase2.8-dbg \
    libncurses5-dev \
    zlib1g-dev gettext \
    libtiff-dev libpnglite-dev \
    libcairo2 libcairo2-dev \
    sqlite3 libsqlite3-dev \
    libpq-dev \
    libreadline6 libreadline6-dev libfreetype6-dev \
    libfftw3-3 libfftw3-dev \
    libboost-thread-dev libboost-program-options-dev liblas-c-dev \
    resolvconf \
    libjasper-dev \
    subversion \
    libav-tools libavutil-dev ffmpeg2theora \
    libffmpegthumbnailer-dev \
    libavcodec-dev \
    libxmu-dev \
    libavformat-dev libswscale-dev \
    checkinstall \
    libglu1-mesa-dev libxmu-dev

More dependencies:

sudo apt-get install libproj-dev
sudo apt-get install libgeos-dev
sudo apt-get install libgdal-dev
sudo apt-get install python-gdal

Navigate to the directory where you want the code and GRASS GIS to be compiled (e.g. ~/dev or ~/bin or /usr/local/src or /opt/, ...).

Then to get the latest code for 7.0 release use:

svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0 grass70_release

Go to the directory which was created by svn:

cd grass70_release

Configuration:

export CFLAGS="-O2 -Wall"
export CXXFLAGS="-O2 -Wall"
export LDFLAGS="-s"
./configure \
    --enable-largefile=yes \
    --with-nls \
    --with-cxx \
    --with-readline \
    --with-pthread \
    --with-proj-share=/usr/share/proj \
    --with-geos=/usr/bin/geos-config \
    --with-wxwidgets \
    --with-cairo \
    --with-opengl-libs=/usr/include/GL \
    --with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
    --with-postgresql=yes --with-postgres-includes="/usr/include/postgresql" \
    --with-sqlite=yes \
    --with-mysql=yes --with-mysql-includes="/usr/include/mysql" \
    --with-odbc=no \
    --with-liblas=yes --with-liblas-config=/usr/bin/liblas-config

Compile:

make -j2

The number after -j is number of cores which should be used for compilation (this may speed up the compilation, it does not influence the result).

Install:

sudo make install
sudo ldconfig

You can optionally not install but then you have to run GRASS GIS using full path to the source code directory (../grass70_release), subdirectory bin, file grass70.

To update the source code later, use:

svn up

And then compile again.

Time to time, you need to recompile everything, so do

make distclean

and then start with configuration and continue with compilation and installation.

7
  • What is the best way to undo these steps. Unfortunately they didn't work for me and the install from the repositories also does not work. Did I create some conflicts? Feb 10, 2015 at 11:13
  • Unless you used sudo make install && sudo ldconfig, there should be no (potentially dangerous) interference with your system (the dependencies are just standard packages). What is the error your are getting? It is when running or compiling GRASS GIS? Or it is when installing some packages? If later, then remove all the (related) PPA repositories and start over. It is very probable that there is somethings strange on your machine, I compiled GRASS GIS on several machines with Ubuntu 14.04 (using these steps) and it always worked quite smoothly.
    – wenzeslaus
    Feb 11, 2015 at 14:45
  • If you used sudo make install and you want to undo it, I think the easiest is to delete the GRASS-related files in the directories where make install puts the files, by default this is `/usr/local'. But you should uninstall all GRASS-related packages first, otherwise you might create even bigger mess than you have now.
    – wenzeslaus
    Feb 11, 2015 at 14:52
  • Also GRASS GIS 7 is heading towards a release. Recently RC2 went out (lists.osgeo.org/pipermail/grass-announce/2015-February/…), so soon (whatever that means) there might be reliable official packages from UbuntuGIS.
    – wenzeslaus
    Feb 11, 2015 at 14:53
  • 1
    Yes, GRASS GIS 7 works pretty well with wxPython 3 on GNU/Linux distributions. However, if you see some bug, please check the bug tracker and open an ticket for it (trac.osgeo.org/grass).
    – wenzeslaus
    Feb 12, 2015 at 17:39
1

Install grass70-core with synaptic package and it will work.

0

In march 2016 I installed it (version 6.4.3, not 7 but may be useful) quite easy with "Geographic Resources Analysis Support System (GRASS GIS)" from Ubuntu Software Center.

0
  1. First you need to install some tools:

    sudo apt-get install gnupg software-properties-common
    
  2. Now install the QGIS Signing Key, so QGIS software from the QGIS repo will be trusted and installed:

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51F523511C7028C3
    
  3. Add the QGIS repo for the latest stable QGIS (3.12.x București):

    Note: lsb_release -c -s in those lines will return your distro name

    sudo add-apt-repository "deb https://qgis.org/ubuntu `lsb_release -c -s` main"
    
  4. Update your repository information to reflect also the just added QGIS one:

    sudo apt-get update
    
  5. Now, install QGIS!

    Note: add qgis-server to this line if you also want to install QGIS Server:

    sudo apt-get install qgis qgis-plugin-grass
    

and fire up [qgis3.12 screen shot1

Answer is delivered from this source

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .