Trouble installing rcpp package on R server- Suse 12 SP3 - R-3.3.2 - r

I am very new to R language. Being an admin I am setting up an rserver and installing the required packages for my use of this R server with SAP HANA 1.0.
The fundamental problem here is when i am installing the rcpp.0.12.16 and getting the below error. g++ is 4.8-6.189.
Are there an incompatibilities witht the OS version R version and rccp package i am using? Please help resolving this issue.
> setwd("/Media/R/R_indep_pack")
> install.packages("Rcpp_0.12.16.tar.gz",repos = NULL, type="source")
* 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 -c Date.cpp -o Date.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -
I/usr/local/include -fPIC -c Module.cpp -o Module.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -
I/usr/local/include -fPIC -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -
I/usr/local/include -fPIC -c api.cpp -o api.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -
I/usr/local/include -fPIC -c attributes.cpp -o attributes.o
g++ -I/usr/local/lib64/R/include -DNDEBUG -I../inst/include/ -
I/usr/local/include -fPIC -c barrier.cpp -o barrier.o
g++ -L/usr/local/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so Date.o Module.o
Rcpp_init.o api.o attributes.o barrier.o -L/usr/local/lib64/R/lib -lR
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o: In function
`_start':
/home/abuild/rpmbuild/BUILD/glibc-2.22/csu/../sysdeps/x86_64/start.S:114:
undefined reference to `main'
collect2: error: ld returned 1 exit status
/usr/local/lib64/R/share/make/shlib.mk:6: recipe for target 'Rcpp.so' failed
make: *** [Rcpp.so] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/usr/local/lib64/R/library/Rcpp’
Warning message:
In install.packages("Rcpp_0.12.16.tar.gz", repos = NULL, type = "source") :
installation of package ‘Rcpp_0.12.16.tar.gz’ had non-zero exit status
>

Your linker is looking for a main function since it is not told to build a shared library:
g++ -L/usr/local/lib64/R/lib -L/usr/local/lib64 -o Rcpp.so Date.o Module.o
Rcpp_init.o api.o attributes.o barrier.o -L/usr/local/lib64/R/lib -lR
Here a -shared is missing from the command line. The command line flags used here are defined via the Makevars file:
$ grep SHLIB.*LDFLAGS $(R RHOME)/etc/Makeconf
SHLIB_CXXLDFLAGS = -shared
SHLIB_CXX98LDFLAGS = -shared
SHLIB_CXX11LDFLAGS = -shared
SHLIB_CXX14LDFLAGS = -shared
SHLIB_CXX17LDFLAGS = -shared
SHLIB_FCLDFLAGS = -shared
SHLIB_LDFLAGS = -shared# $(CFLAGS) $(CPICFLAGS)
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_CXX1XLDFLAGS = -shared
Either these are incorrectly set on your system or you are overriding them via ~/.R/Makevars.

In ubuntu, in such situation, I would search for
apt search rcpp # search in central repository for \
# packages for R packages
In this case, this leads to 'r-cran-rcpp' package which I then install with
sudo apt install r-cran-rcpp
(such packages from 'r-cran-' help, because they install for you the further dependencies in the system - which are often dependencies outside of R - automatically for you. E.g. some packages require java or some other system libraries.).
Similarly, you have to search in rpm or yast2 repos for rcpp packages.
I found googling http://rpmfind.net/linux/rpm2html/search.php?query=R-Rcpp
or http://rpm.pbone.net/index.php3/stat/4/idpl/33595438/dir/opensuse/com/R-RcppArmadillo-0.4.450.1.0-2.38.i586.rpm.html
Or: if you are using conda:
conda install -c r r-rcpp
would definitely help ...
If you don't know conda: This tutorial is super!
https://www.youtube.com/watch?v=YJC6ldI3hWk
Just spend 11 minutes and you will be able to use conda!
(With conda, you can install several R versions with all their packages in parallel in your system - sometimes you need that because some versions are not compativle with some R packages - conda creates for you different local environments within which you can install programs with all their specific dependencies. And you can switch between the environments.)
I definitely recommend you to use conda. Because this solves many package dependency problems.

Related

loop_apply.o: file not recognized: File format not recognized

I am trying to install R’s plyr package. Here is the error message:
* installing *source* package ‘plyr’ ...
** package ‘plyr’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/opt/R-3.4.1/include -DNDEBUG -I"/home/isomorphismes/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -I/opt/boost_1_61_0/boost -c RcppExports.cpp -o RcppExports.o
clang -I/opt/R-3.4.1/include -DNDEBUG -I"/home/cd/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -g -O2 -flto -c loop_apply.c -o loop_apply.o
clang++ -I/opt/R-3.4.1/include -DNDEBUG -I"/home/isomorphismes/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -I/opt/boost_1_61_0/boost -c split-numeric.cpp -o split-numeric.o
clang++ -shared -L/usr/local/lib -o plyr.so RcppExports.o loop_apply.o split-numeric.o
loop_apply.o: file not recognized: File format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/opt/R-3.4.1/share/make/shlib.mk:6: recipe for target 'plyr.so' failed
make: *** [plyr.so] Error 1
ERROR: compilation failed for package ‘plyr’
* removing ‘/home/cd/R/i686-pc-linux-gnu-library/3.4/plyr’
The *.o files are in /opt/plyr/src, from github.com/hadley/plyr. They look like this on my system:
i#scheherezade:/opt/plyr/src$ file *o
loop_apply.o: LLVM IR bitcode
RcppExports.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
split-numeric.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
In case you didn't know, -flto specifies link time optimization, and has been added by R. How did you manage to end up with such a mis-configured R install?
Adding -flto to the link command may work? Or remove it from the loop_apply compilation line. If either of those works, you need to fix your R install.
Compiling with -flto using clang requires (on Ubuntu) installing the llvm-dev package. Otherwise, the linker is unable to handle -flto object files.
apt-get install clang-10 llvm-10-dev
Now the linking should succeed.

Unable to install R packages because of problems with Rcpp

To reproduce:
Follow the instructions in the README of https://github.com/yencarnacion/GCP-jupyter-notebook
open an R jupyter notebook and execute:
system("mkdir -p ~/anaconda3/lib/R/library", intern=TRUE)
system("echo R_LIBS=~/anaconda3/lib/R/library > ~/.Renviron", intern=TRUE)
* Then do a Kernel>Restart and in the first cell of your notebook put:
.libPaths("~/anaconda3/lib/R/library")
as user ubuntu do:
wget https://cran.rstudio.com/src/contrib/Rcpp_0.12.10.tar.gz
as user ubuntu do:
/usr/lib/anaconda/lib/R/bin/R CMD INSTALL --library=~/anaconda3/lib/R/library Rcpp_0.12.10.tar.gz
This is the output I get from /usr/lib/anaconda/lib/R/bin/R CMD INSTALL --library=~/anaconda3/lib/R/library Rcpp_0.12.10.tar.gz:
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Date.cpp -o Date.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Module.cpp -o Module.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c api.cpp -o api.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c attributes.cpp -o attributes.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/anaconda/lib/R/lib -L/usr/lib/anaconda/lib -lgfortran -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/anaconda/lib/R/lib -lR
installing to /home/ubuntu/anaconda3/lib/R/library/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/ubuntu/anaconda3/lib/R/library/Rcpp/libs/Rcpp.so':
/home/ubuntu/anaconda3/lib/R/library/Rcpp/libs/Rcpp.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/ubuntu/anaconda3/lib/R/library/Rcpp’
Because of the Rcpp problem, I am unable to devtools::install_github('rstudio/leaflet') among other things.
Note: This question may be related to Rcpp package in R not install ubuntu 14.04
You can install Rcpp through conda:
conda install r-rcpp
Fyi, you can create a Jupyter Notebook for R on GCP in seconds by using GCP's new AI Platform Notebooks.
In the GCP console go to AI Notebooks -> New Instance -> Select R. You should be able to install any R packages that you need

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...

Link error installing Rcpp "library not found for -lintl"

I just stumbled over a linker error when trying to install some R packages which have Rcpp as a dependency. My setup is Mac OS X 10.9.1 (Mavericks), R 3.0.2 installed by Homebrew. Here's the error output:
> install.packages('Rcpp')
trying URL 'http://cran.fhcrc.org/src/contrib/Rcpp_0.10.6.tar.gz'
Content type 'application/x-gzip' length 1985569 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Date.cpp -o Date.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Module.cpp -o Module.o
clang -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -c Rcpp_init.c -o Rcpp_init.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Timer.cpp -o Timer.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c api.cpp -o api.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c attributes.cpp -o attributes.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c barrier.cpp -o barrier.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c exceptions.cpp -o exceptions.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -F/usr/local/Cellar/r/3.0.2/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently, libintl is part of the gettext package. I did the following, possibly redundant reinstall to make sure my copy was up-to-date:
$ brew install gettext
Warning: gettext-0.18.3.2 already installed
$ brew reinstall gettext
==> Reinstalling gettext
==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.3.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/gettext-0.18.3.2.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gettext/0.18.3.2 --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-emac
==> make
==> make install
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.
OS X provides the BSD gettext library and some software gets confused if both are in the library path.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
It says in the above output that brew doesn't symlink the library, which might explain why install.packages can't find it. What did the trick was adding a library path into ~/.R/Makevars like so:
PKG_LIBS=-L/usr/local/Cellar/gettext/0.18.3.2/lib
This answer is to modify Giupo's answer as it contains a typo but I believe it is important enough to be more prominent than a comment. The solution is a very effective way to install the Rserve package from Homebrew without causing broader problems on OSX:
flags="CPPFLAGS=-I/usr/local/opt/gettext/lib LDFLAGS=-L/usr/local/opt/gettext/include"
install.packages('Rserve', configure.args=flags)
To reduce namespace pollution even more can wrap in local:
local({
flags="CPPFLAGS=-I/usr/local/opt/gettext/lib LDFLAGS=-L/usr/local/opt/gettext/include"
install.packages('Rserve', configure.args=flags)})
I wanna add my 2 cents to the quest by suggesting a less intrusive (meaning: no files/env changes for the user bringing unwanted side-effects in the future)
Take note of LDFLAGS and CPPFLAGS by reinstalling gettext as #cbare did and pass them to install.packages (inside R) with the configure.args param:
flags="LDFLAGS=-L/usr/local/opt/gettext/lib CPPFLAGS=-I/usr/local/opt/gettext/include"
install.packages('Rcpp', configure.args=flags)
This should do the trick (it worked for me while struggling with the same problem installing Rserve).
This worked fine for me:
brew link gettext --force

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