A problem with the installation of the package sen2r

There is a binary version available but the source version is later:
      binary source needs_compilation
sen2r  1.4.0  1.4.2             FALSE

installing the source package ‘sen2r’

probando la URL 'https://cran.rstudio.com/src/contrib/sen2r_1.4.2.tar.gz'
Content type 'application/x-gzip' length 1586758 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

* installing *source* package ‘sen2r’ ...
** package ‘sen2r’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘units’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Ejecución interrumpida
ERROR: lazy loading failed for package ‘sen2r’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sen2r’
Warning in install.packages :
  installation of package ‘sen2r’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/c3/2xy4231s5ksgxhvhx265vgkc0000gn/T/RtmpaWEBuz/downloaded_packages’

Hi,

Follow the advice in the message: install package 'units' first and then reinstall sen2r. I have no experience with this package, but in general when packages do not install, installing the dependencies first solves the problem.

Good luck, JW

thank you for your response but i have the some problem with the package units

There is a binary version available but the source version is later:
      binary source needs_compilation
units  0.6-7  0.7-0              TRUE

installing the source package ‘units’

probando la URL 'https://cran.rstudio.com/src/contrib/units_0.7-0.tar.gz'
Content type 'application/x-gzip' length 854643 bytes (834 KB)
==================================================
downloaded 834 KB

* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
** using staged installation
configure: units: 0.7-0
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... clang++ -std=gnu++11 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for error_at_line... no
checking for gcc... clang
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking udunits2/udunits2.h usability... no
checking udunits2/udunits2.h presence... no
checking for udunits2/udunits2.h... no
checking for ut_read_xml in -ludunits2... no
configure: error: in `/private/var/folders/c3/2xy4231s5ksgxhvhx265vgkc0000gn/T/Rtmpeb5LdC/R.INSTALLc0912184f8b1/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.
--------------------------------------------------------------------------------

See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/units’
Warning in install.packages :
  installation of package ‘units’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/c3/2xy4231s5ksgxhvhx265vgkc0000gn/T/RtmpaWEBuz/downloaded_packages’

You are missing a system library, since it seems you are using macOS, try installing udunits in your system.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.