pkg-config: command not found error - r

I am setting up R with Hadoop. I am getting the following error on installing package "rhbase": (other packages[see below] and their dependencies have been installed successfully)
bash-3.2$ ls
plyrmr_0.4.0.tar rhbase_1.2.1.tar rhdfs_1.0.8.tar rmr2_3.2.0.tar
ERROR:
> install.packages("/Users/raunak/Downloads/rlibs/rhbase_1.2.1.tar", repos = NULL, type="source")
* installing *source* package ‘rhbase’ ...
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I. -g -DHAVE_UINTPTR_T -DHAVE_NETDB_H=1 -fpermissive -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -I./gen_cpp `pkg-config --cflags thrift` -Wall -fPIC -Wall -mtune=core2 -g -O2 -c Hbase.cpp -o Hbase.o
/bin/sh: pkg-config: command not found
In file included from Hbase.cpp:7:
./Hbase.h:10:10: fatal error: 'TProcessor.h' file not found
\#include <TProcessor.h>
^
1 error generated.
make: *** [Hbase.o] Error 1
ERROR: compilation failed for package ‘rhbase’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rhbase’
Warning in install.packages :
installation of package ‘/Users/raunak/Downloads/rlibs/rhbase_1.2.1.tar’ had non-zero exit status
bash-3.2$ which pkg-config
/usr/local/bin/pkg-config
What could be the cause?

Related

Fail to install older version of stringi using renv

I've been trying to install an older version of stringi using renv and am getting the following error. I've had a few earlier errors using restore, but a few restarts have been able to move things through. I tried removing and reinstalling stringi, but still end up with the same error when trying to load the appropriate version.
Installing stringi [1.4.3] ...
FAILED
Error installing package 'stringi':
===================================
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0 -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stri_ICU_settings.cpp -o stri_ICU_settings.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0 -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stri_TODO_justify.cpp -o stri_TODO_justify.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0 -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stri_TODO_splitpos.cpp -o stri_TODO_splitpos.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0 -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stri_TODO_uchar.cpp -o stri_TODO_uchar.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0 -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c stri_brkiter.cpp -o stri_brkiter.o
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setType(SEXP, const char*)':
stri_brkiter.cpp:60:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
60 | if (isNull(opts_brkiter)) {
| ^~~~~~
| Rf_isNull
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setLocale(SEXP)':
stri_brkiter.cpp:130:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
130 | if (isNull(opts_brkiter)) {
| ^~~~~~
| Rf_isNull
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setSkipRuleStatus(SEXP)':
stri_brkiter.cpp:171:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
171 | if (isNull(opts_brkiter)) {
| ^~~~~~
| Rf_isNull
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:259: stri_brkiter.o] Error 1
ERROR: compilation failed for package 'stringi'
* removing 'D:/Projects/project1/renv/staging/1/stringi'
Error: install of package 'stringi' failed [error code 1]
When I try to load the version directly using devtools it conflicts with renv
require(devtools)
install_version("stringi", version = "1.4.3", repos = "http://cran.us.r-project.org")
require(devtools)
Loading required package: devtools
Loading required package: usethis
Warning messages:
1: package ‘devtools’ was built under R version 4.2.2
2: package ‘usethis’ was built under R version 4.2.2
> install_version("stringi", version = "1.4.3", repos = "http://cran.us.r-project.org")
Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/stringi/stringi_1.4.3.tar.gz
Installing package into ‘D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32’
(as ‘lib’ is unspecified)
ℹ Using R 4.2.0 (lockfile was generated with R 4.0.3)
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: cannot remove earlier installation, is it in use?
* removing 'D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32/stringi'
* restoring previous 'D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32/stringi'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\00LOCK-stringi\stringi\libs\icudt69l.dat to D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\stringi\libs\icudt69l.dat: Invalid argument
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\00LOCK-stringi\stringi\libs\x64\stringi.dll to D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\stringi\libs\x64\stringi.dll: Permission denied
Warning message:
In i.p(...) :
installation of package ‘C:/Users/user/AppData/Local/Temp/RtmpK41CGy/remotesce6857a77e39/stringi’ had non-zero exit status
>
The OS/platform by jay.sf made me check over my setup and I realized that I was working with different versions of R. I installed the earlier version, called renv::restore() and the packages successfully installed.

Compilation error when trying to install the Rcplex package in R

I've already installed the CplexApi package using the following guide: https://www.r-bloggers.com/using-cplex-in-r-installing-cplexapi-in-windows-10/
I'm now trying to install the Rcplex package in a simillar way. I've edited the makevars.win file to the following:
ifeq "$(WIN)" "64"
PKG_LIBS = -L"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/x64_win64" -lcplex1280 -lm
PKG_CPPFLAGS = -D_LP64 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include"
else
PKG_LIBS = -L"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/bin/x86_win32" -lcplex1280 -lm
PKG_CPPFLAGS = -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include"
endif
I then entered the following in CMD:
C:\Users\A>R CMD build --no-build-vignettes --no-manual --md5 C:\Users\A\Downloads\cPlex\Rcplex_0.3-3.tar\Rcplex_0.3-3\Rcplex
And this was the output:
* checking for file 'C:\Users\A\Downloads\cPlex\Rcplex_0.3-3.tar\Rcplex_0.3-3\Rcplex/DESCRIPTION' ... OK
* preparing 'Rcplex':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* adding MD5 file
* building 'Rcplex_0.3-3.tar.gz'
Warning: file 'Rcplex/cleanup' did not have execute permissions: corrected
Warning: file 'Rcplex/configure' did not have execute permissions: corrected`
Then I entered the following:
C:\Users\A>R CMD INSTALL --build --no-multiarch .\Rcplex_0.3-3.tar.gz
And I got this as the output:
In R CMD INSTALL
* installing to library 'C:/Users/A/Documents/R/win-library/3.5'
* installing *source* package 'Rcplex' ...
** package 'Rcplex' successfully unpacked and MD5 sums checked
** libs
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -D_LP64 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include" -O2 -Wall -std=gnu99 -mtune=generic -c Rcplex.c -o Rcplex.o
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -D_LP64 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include" -O2 -Wall -std=gnu99 -mtune=generic -c Rcplex_QCP.c -o Rcplex_QCP.o
Rcplex_QCP.c: In function 'Rcplex_QCP':
Rcplex_QCP.c:37:7: warning: unused variable 'trace' [-Wunused-variable]
int trace = INTEGER(getListElement(control,"trace"))[0];
^
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -D_LP64 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include" -O2 -Wall -std=gnu99 -mtune=generic -c Rcplex_params.c -o Rcplex_params.o
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG -D_LP64 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include" -O2 -Wall -std=gnu99 -mtune=generic -c Rcplex_utils.c -o Rcplex_utils.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o Rcplex.dll tmp.def Rcplex.o Rcplex_QCP.o Rcplex_params.o Rcplex_utils.o -LC:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/x64_win64 -lcplex1280 -lm -LC:/PROGRA~1/R/R-35~1.0/bin/x64 -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcplex1280
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'Rcplex'
* removing 'C:/Users/A/Documents/R/win-library/3.5/Rcplex'
I'm wondering what exactly I did wrong?

R: install.package() is not calling compilers on CentOS 6.5

R version: 3.1.1
I want to install this package. I downloaded the source and put it under my home directory. After that I ran install.packages("~/rEDM/",repos=NULL,type="source") to install from source. The error message I got is:
Installing package into ‘/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package ‘rEDM’ ...
** libs
I/usr/include/R -DNDEBUG -I/usr/local/include -I"/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/include" -I../inst/include -c RcppExports.cpp -o RcppExports.o
/bin/sh: I/usr/include/R: No such file or directory
make: [RcppExports.o] Error 127 (ignored)
I/usr/include/R -DNDEBUG -I/usr/local/include -I"/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/include" -I../inst/include -c block_lnlp.cpp -o block_lnlp.o
/bin/sh: I/usr/include/R: No such file or directory
make: [block_lnlp.o] Error 127 (ignored)
I/usr/include/R -DNDEBUG -I/usr/local/include -I"/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/include" -I../inst/include -c forecast_machine.cpp -o forecast_machine.o
/bin/sh: I/usr/include/R: No such file or directory
make: [forecast_machine.o] Error 127 (ignored)
I/usr/include/R -DNDEBUG -I/usr/local/include -I"/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/include" -I../inst/include -c lnlp.cpp -o lnlp.o
/bin/sh: I/usr/include/R: No such file or directory
make: [lnlp.o] Error 127 (ignored)
I/usr/include/R -DNDEBUG -I/usr/local/include -I"/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/include" -I../inst/include -c xmap.cpp -o xmap.o
/bin/sh: I/usr/include/R: No such file or directory
make: [xmap.o] Error 127 (ignored)
-L/usr/local/lib64 -o rEDM.so RcppExports.o block_lnlp.o forecast_machine.o lnlp.o xmap.o -L/usr/lib64/R/lib -lR
/bin/sh: line 2: -L/usr/local/lib64: No such file or directory
make: *** [rEDM.so] Error 127
ERROR: compilation failed for package ‘rEDM’
* removing ‘/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1/rEDM’
Warning message:
In install.packages("~/rEDM/", repos = NULL, type = "source") :
installation of package ‘/ghome/dwuab/rEDM/’ had non-zero exit status
Something is very wrong here, as R did not call the compiler at all.
The author of the package said this is due to R and/or GCC being misconfigured.
My question: is there anyone who knows what the problem is? Or how to troubleshoot the problem?
Edit 1: installing the package through zip file using command install.packages("./master.zip",repos=NULL,type="source") led to the following error message:
Installing package into ‘/d1/dwuab/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\n\0\0\0\0\0\x83h,H\0\0\0\0\0\0\0\0\0\0\0\0\f\0\t\0rEDM-master/UT\005\0\001Fj\x95VPK\003\004\n\0\0\0\b\0\x83h,H\x8ewq\xa1\030\0\0\0\034\0\0\0\031\0\t\0rEDM-master/.Rbuild'
Warning message:
In install.packages("./master.zip", repos = NULL, type = "source") :
installation of package ‘./master.zip’ had non-zero exit status
Edit 2: I have no root privilege on the machine.
As a workaround, I used EasyBuild to compile and install R 3.2.1 with GCC 4.9.3. The whole compiling and installing process took me several days ... Now it works.
You can try the following link...
http://www.cyberciti.biz/faq/centos-linux-install-gcc-c-c-compiler/

R Rcpp install error in R 3.1.0

I want to install Rcpp using install.packages("Rcpp"), but it failed.
The error message:
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c Date.cpp -o Date.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c Module.cpp -o Module.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c api.cpp -o api.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c attributes.cpp -o attributes.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c barrier.cpp -o barrier.o
g++ -shared -L/usr/local/lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
installing to /home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs/Rcpp.so':
/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp/libs/Rcpp.so: undefined symbol: _ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sethbrin/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp’
The downloaded source packages are in
‘/tmp/Rtmp6PKB8N/downloaded_packages’
Warning message:
In install.packages("Rcpp") :
installation of package ‘Rcpp’ had non-zero exit status
Then I use
c++fit _ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode
std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)
I have searched for some solutions for that. It seems that it is because of the gcc version. But I don't know how to change the gcc version that R uses to compile Rcpp package.
CRAN tests Rcpp just like any other of the (by now) 6700+ package.
You can see the aggregate test report and the test setups includes two Fedora-based machines:
one fedora setup using clang and
one fedora setup using g++.
As such your problems are possibly local, or simply due to using an older setup. In which case the Archive section gives you access to an older version.
I've encountered a similar problem.
And after some searches, here are the solutions to alter the compiler:
1. If you have the root privilege:
I found that the Makeconf file in R directory actually sets all the information that is needed for compilation.
To find the path to it, echo which R in the command line.
e.g. I got like:
/data/apps/R/3.1.2/bin/R
And then the file is in:
/data/apps/R/3.1.2/lib64/R/etc/Makeconf
then sudo edit the file on line CC = XXX and maybe more relative lines.
Problem solved!
2. If you only have local user privilege.
Add your own configurations to ~/.R/Makevars
However, #Dirk is probably right.
For me, I finally solved my problem by adding -Doff_t=__off_t to CFLAGS (My problem was error: unknown type name 'off_t'). And I got the halted error when I manually altered parts of the compilers...

R shiny Ubuntu 12.04 installation instructions fail when installing Rcpp needed by R shiny library in R 3.0.2

I am trying to install an R shiny server on my local Ubuntu 12.04 machine, and I followed the instructions here https://github.com/rstudio/shiny-server/wiki/Ubuntu-step-by-step-install-instructions:
When trying to do a:
install.packages('shiny', repos='http://cran.rstudio.com/')
It goes through the dependencies, but fails to install Rcpp. See error log below:
* installing *source* package 'Rcpp' ...
* package 'Rcpp' successfully unpacked and MD5 sums checked
* libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Module.cpp -o Module.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Rcpp_init.c -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Timer.cpp -o Timer.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c barrier.cpp -o barrier.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c exceptions.cpp -o exceptions.o
g++ -shared -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -L/usr/lib/R/lib -lR
g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared -L/usr/lib/R/lib -lR
ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
cp libRcpp.so ../inst/lib
cp libRcpp.a ../inst/lib
rm libRcpp.so libRcpp.a
installing to /usr/local/lib/R/site-library/Rcpp/libs
* R
* inst
* preparing package for lazy loading
Error : package 'codetools' was built before R 3.0.0: please re-install it
Error : unable to load R code in package 'Rcpp'
ERROR: lazy loading failed for package 'Rcpp'
* removing '/usr/local/lib/R/site-library/Rcpp'
* installing *source* package 'httpuv' ...
* package 'httpuv' successfully unpacked and MD5 sums checked
* libs
g++ -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/lib/R/site-library/Rcpp/include" -fpic -O3 -pipe -g -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:75:10: error: 'uint32_t' was not declared in this scope
RcppExports.cpp: In function 'SEXPREC* httpuv_run(SEXP)':
RcppExports.cpp:79:5: error: 'uint32_t' was not declared in this scope
RcppExports.cpp:79:14: error: expected ';' before 'timeoutMillis'
RcppExports.cpp:80:25: error: 'timeoutMillis' was not declared in this scope
RcppExports.cpp:80:38: error: 'run' cannot be used as a function
make: * [RcppExports.o] Error 1
ERROR: compilation failed for package 'httpuv'
* removing '/usr/local/lib/R/site-library/httpuv'
ERROR: dependency 'httpuv' is not available for package 'shiny'
* removing '/usr/local/lib/R/site-library/shiny'
EDITED:
Manually downloading and installing Rcpp gives me:
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Error : package 'codetools' was built before R 3.0.0: please re-install it
So I manually downloaded and installed codetools and re-tried Rcpp:
sudo R CMD INSTALL codetools_0.2-8.tar.gz
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Then followed the instructions again from the Shiny webpage from "Install R" and "Install shiny" and got a similar error but now with caTools, bitops and xtable, so I did the manual installation of each of them. The shiny was installed correctly.
Then followed the next steps in the instructions.
Any ideas why I got this 'was built before R 3.0.0' errors?
Ubuntu 12.04 is a pre-R 3.0.0 release. You have to decide whether you want its long-term support and stability "as is", or if you want newer software.
You can mix and match. Read the CRAN Ubuntu README, adjust your apt settings and enjoy updated r-cran-* packages. With those you can then install shiny and its dependencies.
Manually downloading and installing Rcpp gives me:
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Error : package 'codetools' was built before R 3.0.0: please re-install it
So I manually downloaded and installed codetools and re-tried Rcpp:
sudo R CMD INSTALL codetools_0.2-8.tar.gz
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Then followed the instructions again from the Shiny webpage from "Install R" and "Install shiny" and got a similar error but now with caTools, bitops and xtable, so I did the manual installation of each of them. The shiny was installed correctly.
Then followed the next steps in the instructions. All went well from there. Not sure why I was getting these was built before 3.0.0 errors.

Resources