- Mais recentes
- Mais votos
- Mais comentários
For Amazon SageMaker notebook Instances, you have the ability to assume root privileges, so instead of:
$ yum install r-cran-rjava
you can try:
$ sudo yum install r-cran-rjava
which will allow you to impersonate the superuser (ie. root) for that command 1
But I don't believe that package exists in the available repos (ie. may be valid for another distro of Linux, but does not appear to be available in the yum repos -- running yum search 'r-cran-rjava' returned no results 2)
Instead, from a prompt, install R + the necessary development files for later installation of R packages:
$ sudo yum install -y R-java-devel.x86_64
And finally, install the necessary XML libraries to support the XML package in R:
$ sudo yum install -y libxml2-devel
3
After which you can then open R (either as root user...)
$ sudo R
or personal/local user
$ R
and execute the package installation:
> install.packages("XML", repos = "https://cran.r-project.org")
EDITED TO FIX RJAVA PACKAGE INSTALLATION
It looks like the installation is requiring libgomp.spec/libgomp.a files, so you can first find that file:
$ sudo find / -iname libgomp.spec
which should be located at /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.spec -- if so, you can manually create symlinks to fix this:
$ sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.spec /usr/lib64/
$ sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.a /usr/lib64/
If that ran correctly, you should now see both files in /usr/lib64 path:
$ ls /usr/lib64/libgomp*
Once confirmed, you can run the install.package('rJava') command.
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há um ano