rankthefirst
rankthefirst

Reputation: 1478

"rgdal" installation failed on ubuntu

I use travis to check my R package, it's based on a virtual machine of ubuntu. One of my dependencies is rgdal from CRAN, which cannot be installed correctly on travis.

First it said:

ERROR: dependencies ‘rgdal’ is not available for package ‘my package’

I followed the instruction here, then comes the endless dependencies, I installed one by one, according to the instruction of every trial. Finally I installed packages is as below:

  libproj-dev
  libcurl4-gnutls-dev
  libdap-dev
  libgdal-dev
  libgdal1h
  libhdf5-dev
  libhdf5-serial-dev
  libgdal-dev
  libgdal1-dev

It said I still need to install libhdf5-7 = 1.8.11-3ubuntu1~precise1~ppa1

But when I install package libhdf5-7 = 1.8.11-3ubuntu1~precise1~ppa1, it gives another error:

E: Unable to locate package 
E: Unable to locate package 1.8.11-3ubuntu1~precise1~ppa1
E: Couldn't find any package by regex '1.8.11-3ubuntu1~precise1~ppa1'

And it seems no more solutions now.

I wonder how to fix this on travis? Is it a common issue on only travis virtual machine or it could happen on any ubuntu machine? Or the package rgdal has some problems with ubuntu?`

Background:

All my installation above used apt-packages of travis, which is explained as below by travis:

apt_packages: A list of packages to install via apt-get. Common examples here include entries in SystemRequirements. This option is ignored on non-linux builds

Upvotes: 2

Views: 727

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368499

As of this week, you can opt into using Ubuntu 14.04 on Travis:

Switching to 14.04 may be enough in this case. If not, also note that you can prepare your own .deb packages. I mention this in an blog post from this summer.

As the geospatial packages are a little involved that is probably your best. You would need to know how to build Debian packages, and how to use Launchpad to have them auto-built for you. Both topics have lots of tutorials.

Upvotes: 2

Related Questions