-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
The package units depends on the packages udunits2. However, while the udunits2 package seems to successfully install after running install.packages('udunits2'), it doesn't actually work out-of-the-box. You can see this when you try to install it from from source.
I received the following error when I tried to install udunits2 from source...
> install.packages('udunits2', type = 'source')
[OMITTED]
-----Error: libudunits2 not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
ERROR: configuration failed for package ‘udunits2’
-----Error: libudunits2 not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
ERROR: configuration failed for package ‘udunits2’
Hence, what we need are these libraries.
Here is how I solved it on my mac using Homebrew.
- In your Terminal.app, do the following:
brew install udunits
While I used Homebrew, it appears you can download the libraries here. I did not do it this way, but I'm assuming that if you do this successfully, then you should be able to do steps 2 and 3.
- Once installed, go to R and install
udunits2from source...
install.packages('udunits2', type = 'source', repo = 'cran.rstudio.com')- Install
units(I installed the development version).
devtools::install_github('edzer/units', type = 'source')Or
install.packages('units', type = 'source')DONE
brainprint, broofa, rebeccagreenblatt, eth4io, ron-graf and 1 morerebeccagreenblatt and eth4io
Metadata
Metadata
Assignees
Labels
No labels