Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

units installation error: Error in function udunits_init: Operating-system error. See "errno". #184

Closed
wdkrnls opened this issue Jan 10, 2019 · 5 comments

Comments

@wdkrnls
Copy link

wdkrnls commented Jan 10, 2019

I'm seeing a strange installation error on CentOS. It seems to compile just fine, but then fails at testing the install.

* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
configure: units: 0.6-2
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 /opt/rh/devtoolset-7/root/usr/bin/g++ accepts -g... yes
checking how to run the C++ preprocessor... /opt/rh/devtoolset-7/root/usr/bin/g++ -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... 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... no
checking for _Bool... no
checking for error_at_line... yes
checking for gcc... /opt/rh/devtoolset-7/root/usr/bin/gcc
checking whether we are using the GNU C compiler... yes
checking whether /opt/rh/devtoolset-7/root/usr/bin/gcc accepts -g... yes
checking for /opt/rh/devtoolset-7/root/usr/bin/gcc option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
/opt/rh/devtoolset-7/root/usr/bin/g++ -I"/share/apps/R/R-3.5.1-openblas/lib64/R/include" -DNDEBUG -I/usr/include/udunits2 -I/usr/include/udunits2 -I/usr/local/include -I"/home/wdkrnls/R/lib/7/3.5/Rcpp/include" -I/usr/local/include   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
/opt/rh/devtoolset-7/root/usr/bin/gcc -I"/share/apps/R/R-3.5.1-openblas/lib64/R/include" -DNDEBUG -I/usr/include/udunits2 -I/usr/include/udunits2 -I/usr/local/include -I"/home/wdrknls/R/lib/7/3.5/Rcpp/include" -I/usr/local/include   -fpic  -I/share/apps/R/R-3.5.1-src/libs/include  -c io.c -o io.o
/opt/rh/devtoolset-7/root/usr/bin/g++ -I"/share/apps/R/R-3.5.1-openblas/lib64/R/include" -DNDEBUG -I/usr/include/udunits2 -I/usr/include/udunits2 -I/usr/local/include -I"/home/wdrknls/R/lib/7/3.5/Rcpp/include" -I/usr/local/include   -fpic  -g -O2  -c udunits.cpp -o udunits.o
/opt/rh/devtoolset-7/root/usr/bin/g++ -shared -L/share/apps/R/R-3.5.1-openblas/lib64/R/lib -L/share/apps/R/R-3.5.1-src/libs/lib -o units.so RcppExports.o io.o udunits.o -lexpat -lexpat -ludunits2 -L/share/apps/R/R-3.5.1-openblas/lib64/R/lib -lR
installing to /home/wdrknls/R/lib/7/3.5/units/libs
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘units’:
 .onLoad failed in loadNamespace() for 'units', details:
  call: udunits_init(file.path(.get_ud_xml_dir(), "udunits2.xml"))
  error: Error in function udunits_init: Operating-system error.  See "errno".
Error: loading failed
Execution halted
ERROR: loading failed
@Enchufa2
Copy link
Member

  • How did you install udunits2? From EPEL or custom installation?
  • How did you install units, using install.packages?
  • What's the content of the environment variable UDUNITS2_XML_PATH?

@edzer
Copy link
Member

edzer commented Jan 10, 2019

Is it possible that you have multiple versions of udunits installed on you system, e.g. one manual and one packaged? (See r-spatial/sf#844)

@wdkrnls
Copy link
Author

wdkrnls commented Jan 11, 2019

Enchufa2: It's possible that this environment variable was not defined, but I was trying to update with install.packages since I noticed this was failing when trying to update sf.

@Enchufa2
Copy link
Member

You don't need to set that variable unless udunits2 is installed in a non-standard location.

@ladypolo19
Copy link

I'm sorry, I have the same problem and I don't know how to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants