Search code examples
projcdo-climate

Installing cdo - libproj13 is missing


Dear proj and cdo specialists,

I am trying to install cdo (climate data operator) on Ubuntu 18.04. I have gdal 3.0.0 and proj 7.0.1 installed. There are some missing dependencies which cannot be installed. It boils down to the point where it says libproj13 is missing and cannot be installed.

What I have done so far. Install cdo, it depends libmagplus3v5, this depends libgeotiff2, this depends libproj13, this can't be installed. See here:

root@eosao34:~# apt-get install cdo
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cdo : Depends: libmagplus3v5 (>= 2.34.1-2~) but it is not going to be installed
       Recommends: python-cdo but it is not installable
E: Unable to correct problems, you have held broken packages.
root@eosao34:~# apt-get install libmagplus3v5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmagplus3v5 : Depends: libgeotiff2 (>= 1.4.0) but it is not going to be installed
                 Depends: libterralib3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@eosao34:~# apt-get install libgeotiff2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgeotiff2 : Depends: libproj13 (>= 4.8.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
root@eosao34:~# apt-get install libproj13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libproj13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libproj13' has no installation candidate
root@eosao34:~#

When I search for libproj1. I get this:

root@eosao34:~# locate libproj1
/usr/share/doc/libproj12
/usr/share/doc/libproj15
/usr/share/doc/libproj19
/usr/share/doc/libproj12/NEWS.Debian.gz
/usr/share/doc/libproj12/changelog.Debian.gz
/usr/share/doc/libproj12/copyright
/usr/share/doc/libproj15/AUTHORS
/usr/share/doc/libproj15/NEWS.Debian.gz
/usr/share/doc/libproj15/NEWS.gz
/usr/share/doc/libproj15/README.gz
/usr/share/doc/libproj15/changelog.Debian.gz
/usr/share/doc/libproj15/copyright
/usr/share/doc/libproj19/AUTHORS
/usr/share/doc/libproj19/NEWS.Debian.gz
/usr/share/doc/libproj19/NEWS.gz
/usr/share/doc/libproj19/README
/usr/share/doc/libproj19/changelog.Debian.gz
/usr/share/doc/libproj19/copyright
/var/cache/apt/archives/libproj12_4.9.3-2_amd64.deb
/var/cache/apt/archives/libproj19_7.0.0-1~bionic0_amd64.deb
/var/lib/dpkg/info/libproj12:amd64.list
/var/lib/dpkg/info/libproj12:amd64.md5sums
/var/lib/dpkg/info/libproj12:amd64.shlibs
/var/lib/dpkg/info/libproj12:amd64.symbols
/var/lib/dpkg/info/libproj12:amd64.triggers
/var/lib/dpkg/info/libproj15:amd64.list
/var/lib/dpkg/info/libproj15:amd64.md5sums
/var/lib/dpkg/info/libproj15:amd64.shlibs
/var/lib/dpkg/info/libproj15:amd64.symbols
/var/lib/dpkg/info/libproj15:amd64.triggers
/var/lib/dpkg/info/libproj19:amd64.list
/var/lib/dpkg/info/libproj19:amd64.md5sums
/var/lib/dpkg/info/libproj19:amd64.shlibs
/var/lib/dpkg/info/libproj19:amd64.symbols
/var/lib/dpkg/info/libproj19:amd64.triggers

So apparently i have libproj12, libproj15 and libproj19 installed. I have the feeling that libprojXX is delivered with a specific version of proj. Because I have tried installing different versions of proj from apt package manager and now see all the different versions of libprojXX. But not libproj13. Unfortunately I cannot find a source which explains how to install libproj13 or which libprojXX is linked to which proj. I have tested installing cdo on other VMs where libproj13 is present. There it works.

My question is: How do I get libproj13 installed so that cdo runs?


Solution

  • The easiest option is to install CDO using conda (https://anaconda.org/conda-forge/cdo).

    However, I have a set of bash scripts for installing CDO and dependencies from source. This will presumably solve your problems: https://github.com/r4ecology/nctoolkit/tree/master/cdo_installers