sf icon indicating copy to clipboard operation
sf copied to clipboard

More helpful log message upon installation failure

Open FieteO opened this issue 3 years ago • 0 comments

I had to install this package as a dependency of geojsonio. Usually when the installation of packages fail, I look in the log, see an instructional block what is missing, follow the instruction to install the system package and try again.

Helpful instructions from another missing package

configure: error: in `/tmp/RtmproXbAx/R.INSTALLce14f90aa/units':
configure: error: 
--------------------------------------------------------------------------------
  Configuration failed because libudunits2.so was not found. Try installing:
    * deb: libudunits2-dev (Debian, Ubuntu, ...)
    * rpm: udunits2-devel (Fedora, EPEL, ...)
    * brew: udunits (OSX)
  If udunits2 is already installed in a non-standard location, use:
    --configure-args='--with-udunits2-lib=/usr/local/lib'
  if the library was not found, and/or:
    --configure-args='--with-udunits2-include=/usr/include/udunits2'
  if the header was not found, replacing paths with appropriate values.
  You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
--------------------------------------------------------------------------------

In this case I immediately know what to do, without even knowing what libudunits2 is. The relevant code for this log message is defined here.

Less helpful instructions from this package

For this package, I get the following output:

** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/home/fiete/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
  installation of package ‘sf’ had non-zero exit status

This was less clear for me, since (at least in debian) there is no gdal-config package, but a libgdal-dev and a libgdal-bin when doing an apt search. Of course after googling around, I found your installation instructions in the README, however it would be great if it wasn't necessary and there were a better hint in the install log.

FieteO avatar Jan 16 '22 09:01 FieteO