Error installing r package httpuv
Hi I can't install httpuv from cran. It gives me the following error:
byte-compile and prepare package for lazy loading Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/data/data/com.termux/files/usr/lib/R/library/Rcpp/libs/Rcpp.so': dlopen failed: library "libgnuiconv.so" not found Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load Execution halted ERROR: lazy loading failed for package ‘httpuv’
I tried pkg install libgnuiconv but there are no packages with that name.
Thank you for all this work.
apt reinstall r-cran-rcpp or if that doesm't work ln -s libiconv.so libgnuiconv.so . Its literally the same library.
Thank you for such a fast reply. Unfortunately neither option works. I've successfully created the libgnuiconv.so file ad reinstalled r cran but it still gives the same error when I try to install httpuv.
Ok, just found my mistake. I was in $home directory when I did the ln command you suggested, so the file was never found. Sorry for my lack of knowledge, I am really new to all this. Now it throws a new error when it tests the package:
dlopen failed: cannot locate symbol "uv__pthread_sigmask" referenced by "/data/data/com.termux/files/usr/lib/R/library/00LOCK-httpuv/00new/httpuv/libs/httpuv.so"...
https://github.com/its-pointless/gcc_termux/issues/54#issuecomment-456422843
I think i should aplly the patch this guy talks about, but unfortunately I don't really know how to do that.
Do you think you could help? Thank you again.. Sorry for my noobness :)
https://github.com/its-pointless/gcc_termux/blob/master/R-patches/httpuv.patch download httpuv and extract it Apply patch R CMD INSTALL httpuv
Again, thank you for your readiness. I managed to update the lines with a "+" and removing those with a "-" in the original makevars file (maybe there's some pro way to do this but it's out of my noob reach). Now it throws an error regarding permissions on configure:
(cd libuv
&& touch aclocal.m4
&& touch -r aclocal.m4 configure Makefile.in
&& chmod +x configure
&& CC="gcc" CFLAGS="-g -O2 -fpic -fvisibility=hidden" AR="ar" RANLIB="ranlib" LDFLAGS="-L/data/data/com.termux/files/usr/lib -landroid-support -lm -lgfortran -lopenblas -landroid-glob -liconv -llzma -ljpeg -lpng -licuuc -licudata -lcompiler_rt -latomic " ./configure "--quiet" --host=aarch64-unknown-linux-android)
/data/data/com.termux/files/usr/bin/sh: 5: ./configure: Permission denied
make: *** [Makevars:68: libuv/Makefile] Error 126
I tried to google it but the I just don't understand the solutions prooosed.
Do you have any ideas?
missed this but the package may require patching.
https://github.com/its-pointless/gcc_termux/blob/master/R-patches/httpuv.patch download httpuv and extract it Apply patch R CMD INSTALL httpuv
Perhaps another newbie can be of some help. Always in the same folder:
- To download the patch, use:
wget https://raw.githubusercontent.com/its-pointless/gcc_termux/master/R-patches/httpuv.patch
- To download and extract httpuv and extract it, use:
wget https://cran.r-project.org/src/contrib/httpuv_1.6.1.tar.gz
tar xf httpuv_1.6.1.tar.gz
- To apply the patch, use:
patch httpuv/src/Makevars < httpuv.patch
- To install httpuv once patched, use:
R CMD INSTALL httpuv
Hope this helps!