I am trying to install R GPU package "gpuR" and I get the following error message:
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'gpuR.so' failed
make: *** [gpuR.so] Error 1
ERROR: compilation failed for package ‘gpuR’
* removing ‘/home/fibrou/R/x86_64-pc-linux-gnu-library/3.4/gpuR’
Warning in install.packages :
installation of package ‘gpuR’ had non-zero exit status
When I try to install OpenCL, I get the following error message:
install.packages("OpenCL")
Installing package into ‘/home/fibrou/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/OpenCL_0.1-3.tar.gz'
Content type 'application/x-gzip' length 15524 bytes (15 KB)
downloaded 15 KB
installing source package ‘OpenCL’ ...
** package ‘OpenCL’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ocl.c -o ocl.o
ocl.c:6:23: fatal error: CL/opencl.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'ocl.o' failed
make: *** [ocl.o] Error 1
ERROR: compilation failed for package ‘OpenCL’
removing ‘/home/fibrou/R/x86_64-pc-linux-gnu-library/3.4/OpenCL’
Warning in install.packages :
installation of package ‘OpenCL’ had non-zero exit status
I am running the latest LTS version of Ubuntu: 16.04, as well as the latest version of RStudio (Version 1.1.383 ) and R (R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree") I can find.
Why am I not able to install the GPU packages? What am I doing wrong?
Related
I'm trying to install "randomForest" on R 3.6.3 as below:
urlPackage <- "https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-14.tar.gz"
install.packages(urlPackage, repos=NULL, type="source")
(install.packages('randomForest') throws the error: package 'randomForest' is not available (for R version 3.6.3))
The lines above, however, give me the following error:
trying URL 'https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-14.tar.gz'
Content type 'application/x-gzip' length 80074 bytes (78 KB)
==================================================
downloaded 78 KB
* installing *source* package ‘randomForest’ ...
** package ‘randomForest’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc-8 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -mtune=native -g -O2 -Wall -pedantic -Wconversion -c classTree.c -o classTree.o
/bin/sh: gcc-8: command not found
make: *** [classTree.o] Error 127
ERROR: compilation failed for package ‘randomForest’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/randomForest’
Warning in install.packages :
installation of package ‘/var/folders/66/3s4r17rx7ln0b1p8tyrmws780000gn/T//RtmpDOHynP/downloaded_packages/randomForest_4.6-14.tar.gz’ had non-zero exit status
Does anyone have any idea how to solve this? I'm on macOS Catalina (ver 10.15.7)
You should install the gcc8 tool:
sudo port install gcc8
Related Links
MacPorts - GCC8
YouTube - Install GCC 8 with Homebrew on macOS
I am new to learning R and i get the following error while installing the package called 'hemp'. Its a package which is used in psychometric analysis. Can anyone tell me what causes this errror?
Downloading GitHub repo cddesja/hemp#master
Installing 1 packages: nloptr
Installing package into ‘C:/Users/UJJWAL/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the
source version is later:
binary source needs_compilation
nloptr 1.2.2.1 1.2.2.2 TRUE
installing the source package ‘nloptr’
trying URL 'https://cran.rstudio.com/src/contrib/nloptr_1.2.2.2.tar.gz'
Content type 'application/x-gzip' length 2450931 bytes (2.3 MB)
downloaded 2.3 MB
* installing *source* package 'nloptr' ...
** package 'nloptr' successfully unpacked and MD5 sums checked
** using staged installation
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
*** arch - i386
/mingw32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-4.0.2/include" -DNDEBUG -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c dummy.cpp -o dummy.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.0.2/include" -DNDEBUG -I"/i386/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init_nloptr.c -o init_nloptr.o
init_nloptr.c:35:10: fatal error: nlopt.h: No such file or directory
#include "nlopt.h"
^~~~~~~~~
compilation terminated.
make: *** [C:/PROGRA~1/R/R-4.0.2/etc/i386/Makeconf:222: init_nloptr.o] Error 1
ERROR: compilation failed for package 'nloptr'
* removing 'C:/Users/UJJWAL/Documents/R/win-library/4.0/nloptr'
Error: Failed to install 'hemp' from GitHub:
(converted from warning) installation of package ‘nloptr’ had non-zero exit status
Seems that it wouldbe a little harder to install nloptr on Windows. It require nlopt to be installed first. See this for more info: https://www.r-project.org/nosvn/pandoc/nloptr.html
I have RStudio 1.1.419 running on a Mac OS El Capitan. I am trying to install the dplyr package. The installation first attempts to install package utf8. The following is the text I get back:
installing source package ‘utf8’ ...
** package ‘utf8’ successfully unpacked and MD5 sums checked
** libs
llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -Iutf8lite/src -fPIC -mtune=core2 -g -O2 -c as_utf8.c -o as_utf8.o
make: llvm-gcc-4.2: No such file or directory
make: *** [as_utf8.o] Error 1
ERROR: compilation failed for package ‘utf8’
removing ‘/Users/andrewdkilmer/Library/R/3.2/library/utf8’
Warning in install.packages :
installation of package ‘utf8’ had non-zero exit status
Since utf8 failed to install, dplyr cannot install either. Why am I getting this 'No such file or directory' error?
Never mind, updated to R version 3.4 and it is working.
I'm trying to install the R package gtools from the Linux Mint command line. After choosing the closest CRAN mirror, I'm getting the error message that no such file or directory was found and that installation of the package had a non-zero exit status. More specifically:
> install.packages('gtools')
Installing package into ‘/home/lizi/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cloud.r-
project.org/src/contrib/gtools_3.5.0.tar.gz'
Content type 'application/x-gzip' length 64855 bytes (63 KB)
==================================================
downloaded 63 KB
* installing *source* package ‘gtools’ ...
** package ‘gtools’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c roman2int.c -o roman2int.o
In file included from roman2int.c:1:0:
/usr/share/R/include/R.h:55:80: fatal error: stdlib.h: No such file or
directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'roman2int.o' failed
make: *** [roman2int.o] Error 1
ERROR: compilation failed for package ‘gtools’
* removing ‘/home/lizi/R/x86_64-pc-linux-gnu-library/3.4/gtools’
The downloaded source packages are in
‘/tmp/Rtmp0z5PS6/downloaded_packages’
Warning message:
In install.packages("gtools") :
installation of package ‘gtools’ had non-zero exit status
The package has no dependencies, and I was under the impression that install.packages was straightforward. What am I doing wrong?
I am trying to install 'forecast' package in R (version 3.1.1 64bit) on my Debian jessie machine.
I have installed other R packages required for my analyses. However, when I try to install 'forecast' package it require dependencies, namely, rlang, tipple and ggplot2. It looks from the error log (shown below) tipple and ggplot2 requires rlang to be installed for them to be installed.
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c sexp.c -o sexp.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c splice.c -o splice.o
In file included from splice.c:2:0:
vector.h: In function ‘namespace_rlang_sym’:
vector.h:94:19: error: ‘R_DoubleColonSymbol’ undeclared (first use in this function)
return(Rf_lang3(R_DoubleColonSymbol, rlang_sym, sym));
^
vector.h:94:19: note: each undeclared identifier is reported only once for each function it appears in
/usr/lib/R/etc/Makeconf:128: recipe for target 'splice.o' failed
make: *** [splice.o] Error 1
ERROR: compilation failed for package ‘rlang’
removing ‘/usr/local/lib/R/site-library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
ERROR: dependency ‘rlang’ is not available for package ‘tibble’
* removing ‘/usr/local/lib/R/site-library/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependency ‘tibble’ is not available for package ‘ggplot2’
* removing ‘/usr/local/lib/R/site-library/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependency ‘ggplot2’ is not available for package ‘forecast’
* removing ‘/usr/local/lib/R/site-library/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status
rlang installation fails with the above error message. Any expert help would be much appreciated.
I think the issue is your R version, based on this issue which generates the same error. Some of the "tidyverse" packages such as tibble and rlang are quite recent and require newer R versions.
So: try updating your R version. The latest is 3.4.0.