安装cdo-libproj13丢失

问题描述

亲爱的项目和CDO专家,

我正在尝试在Ubuntu 18.04上安装cdo(气候数据操作员)。我安装了gdal 3.0.0和proj 7.0.1。有些缺少的依赖项无法安装。归结为说libproj13丢失并且无法安装。

到目前为止我所做的。安装cdo,它取决于libmagplus3v5,这取决于libgeotiff2,这取决于libproj13,无法安装。看到这里:

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:~#

当我搜索libproj1时。我明白了:

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

因此,显然我已经安装了libproj12libproj15libproj19。 我感觉libprojXX是随proj的特定版本一起提供的。因为我尝试从apt软件包管理器中安装不同版本的proj,现在可以看到所有不同版本的libprojXX。但不是libproj13。不幸的是,我找不到源来解释如何安装libproj13或哪个libprojXX链接到哪个proj。我已经测试过在存在libproj13的其他VM上安装cdo。在那里工作。

我的问题是: 如何安装libproj13以便cdo运行?

解决方法

最简单的选择是使用conda(https://anaconda.org/conda-forge/cdo)安装CDO。

但是,我有一组bash脚本,用于从源代码安装CDO和依赖项。大概可以解决您的问题:https://github.com/r4ecology/nctoolkit/tree/master/cdo_installers