Hi, Adding gdal-bin in before-install appears indeed to solve the issue! Thank you very much for the help!
Lorenzo On 20 Dec 2017 13:47, "Benjamin Leutner" <benjamin.leut...@uni-wuerzburg.de> wrote: Hi, I can't speak for gdalUtils, but my package uses rgdal and builds well on travis. I'm also installing gdal-bin, which you are not. Maybe that helps. Here's my (admittedly somewhat messy) travis file: https://github.com/bleutner/RStoolbox/blob/master/.travis.yml Cheers, Benjamin On 12/19/2017 02:45 PM, Lorenzo Busetto wrote: > > (crossposting from StackOverflow - > https://stackoverflow.com/q/47884874/6871135) > > Dear all, > > in a package I am maintaining (https://github.com/lbusett/MODIStsp), I > use > the `gdalUtils` package as a wrapper to > > call > > gdal processing > utilities. The problem is that I can not find a way to run my test suite > and examples on TRAVIS-CI. This appears > > to > > be related to the fact that the gdal installation folder is not found on > the path, so that I receive the following > > error: > > Warning in gdalUtils::gdal_setInstallation(ignore.full_scan = TRUE) >> No GDAL installation found. Please install 'gdal' before continuing: >> - www.gdal.org (no HDF4 support!) >> - www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED) >> - www.fwtools.maptools.org (with HDF4 support) >> > (see here for the full build log: > https://travis-ci.org/lbusett/MODIStsp/jobs/318037312) > > `gdalUtils::gdal_setInstallation()` is supposed to search for a > > valid gdal installation, by first using sys.which(), and (in > > case it fails) looking on "typical" installation paths (see > https://www.rdocumentation.org/packages/gdalUtils/versions/ > 2.0.1.7/topics/gdal_setInstallation > ). > > This happens besides gdal (apparently) being installed on travis in the > build, using the following travis.yml configuration: > > language: r > cache: packages > > warnings_are_errors: false > > > before_install: > - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes > - sudo add-apt-repository -y ppa:opencpu/jq --yes > - sudo apt-get -qq update > - sudo apt-get install -y libgdal-dev libproj-dev > - PATH="/usr/local/gdal/bin:$PATH" > - export DISPLAY=:99.0 > - sh -e /etc/init.d/xvfb start > > matrix: > include: > - os: linux > dist: trusty > sudo: required > env: > global: > - R_LIBS="http://cran.rstudio.com" > - R_BUILD_ARGS="--no-build-vignettes --no-manual" > - R_CHECK_ARGS="--no-build-vignettes --no-manual --as-cran" > - R_CHECK_TIMINGS_="0" > - BOOTSTRAP_LATEX="1" > apt_packages: > - libgdal-dev > - libproj-dev > - libcairo2-dev > - libatk1.0-dev > - libpango1.0-dev > - libgtk2.0-dev > - libglib2.0-dev > - libcurl4-openssl-dev > r_binary_packages: > - cairoDevice > - RGtk2 > > Do you have any suggestions to solve the issue? Do I need to somehow set > the PATH to gdal in the travis.yml script? If so, how could I find out > where gdal is being installed? ( > I already > > tried adding a line like > > - PATH="/usr/local/gdal/bin:$PATH" > > in > > > before_install > within > > the yml but it did not work). > > Thanks in advance for any help! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel