How can I install RSudio in KDE Neon I have downloaded rstudio-1.4.1106-amd64.deb and I ran sudo dpkg -i rstudio-1.4.1106-amd64.deb in terminal, I got following:
dpkg: dependency problems prevent configuration of rstudio: rstudio depends on libclang-dev; however: Package libclang-dev is not installed. rstudio depends on libpq5; however: Package libpq5 is not installed.
dpkg: error processing package rstudio (--install): dependency problems - leaving unconfigured Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for shared-mime-info (1.15-1) ... Errors were encountered while processing:rstudio
There are some packages required that are not installed by default. Please try the following, which worked for me on Kubuntu 20.04 recently:
URL='https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1106-amd64.deb'; FILE=`mktemp`; wget "$URL" -qO $FILE && sudo dpkg -i $FILE; rm $FILE
sudo apt --fix-broken install
First I had to find and fix broken packages:
apt --fix-broken install
Then the package installed correctly for me:
sudo dpkg -i rstudio-2022.02.3-492-amd64.deb
Related
I installed Solaris 11.4 x86 in VirtualBox. I need to install the GCC compiler so that I can run c code in Solaris. But each time I try to install the package this error occurs:
Errors were encountered while attempting to retrieve package or file data for the
requested operation. Details follow:
http protocol error: Unknown error code: 500 reason: Internal Server Error
URL: 'http://pkg.oracle.com/solaris/release/solaris/file/1/53eb07cd6fade116a6fdea7397c6839929ec0925'
publisher information:
I have used the following commands:
sudo pkg install developer/gcc/gcc-c-7
also tried -nv option
sudo pkg install -nv gcc
sudo pkg install -nv gcc-7
sudo pkg install -nv developer/gcc-7
see the output of the following command:
kashif#OS:~$ pkg list | grep GCC
output:
system/library/gcc/gcc-c++-runtime 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c++-runtime-7 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c-runtime 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c-runtime-7 7.3.0-11.4.0.0.1.14.0 i--
image below shows gcc package information from repostiry
I am trying to solve this problem for 2 days. I have read documentation from
https://docs.oracle.com/cd/E37838_01/html/E60979/publisher-config.html
I also tried to install developerstudio 12.6 but it didn't work.
overall picture of error and command:
I have googled for errors tried to find information about errors and searched for how to install GCC on Oracle Solaris 11. I couldn't find any solution to this problem.
Try "wget http://pkg.oracle.com/solaris/release/p5i/0/developer%2Fgcc.p5i" or your preferred gcc package and manually install it with pkg install. You can try:
pkg install -v
after downloading.
I am trying to install R library for Facebook's prophet on centOS 7. For easy reproducibility, I am providing a dockerfile and commands.
FROM centos:7
RUN yum -y install epel-release
RUN yum -y groupinstall "Development Tools"
RUN yum -y install proj
RUN yum -y install udunits2-devel
RUN yum -y install openssl-devel
RUN yum -y install libjpeg-turbo-devel
RUN yum -y install libcurl-devel
RUN yum -y install v8-devel
RUN yum -y install R
To build the dockerfile, use following command.
docker build -t test_prophet_installation .
Once it is built, I run the container using this next command.
docker run -it --entrypoint=/bin/bash test_prophet_installation
Now, I am inside my container. I tried to install prophet using below command.
su - -c "R -e \"install.packages('prophet', repos='http://cran.rstudio.com/')\""
The above command said, one of the dependencies of prophet i.e rstan failed to install. So I tried to install 'rstan' using the following command.
su - -c "R -e \"install.packages('rstan', repos='http://cran.rstudio.com/')\""
After running the above command, I got the following error.
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
* removing '/usr/lib64/R/library/rstan'
The downloaded source packages are in
'/tmp/RtmpsPDQ9G/downloaded_packages'
Updating HTML index of packages in '.Library'
Warning messages:
1: In install.packages("rstan", repos = "http://cran.rstudio.com/") :
installation of package 'rstan' had non-zero exit status
2: In file.create(f.tg) :
cannot create file '/usr/share/doc/R-3.6.0/html/packages.html', reason 'No such file or directory'
3: In make.packages.html(.Library) : cannot update HTML package index
I tried almost all the troubleshooting from Google to solve above error still no luck. I think, I am not setting some environment variable correctly.
The problem here is that when using the yum groupinstall "Development Tools", the installed gcc is 4.8.5 and therefore does not support C++14 (as you can see here).
In order to solve this you need to add the following:
RUN yum -y install centos-release-scl
RUN yum -y install devtoolset-8-gcc*
RUN scl enable devtoolset-8 sh
on top of this, you have to define the Makevars for rstan. You can find an explanation here: https://github.com/stan-dev/rstan/issues/569
I created this Makevars:
CXX14 = g++ -std=c++1y -Wno-unused-variable -Wno-unused-function -fPIC
and added a COPY in my Dockerfile:
COPY Makevars /root/.R/Makevars
I'm using the following command to download the packages:
install.packages('rstan', repos='http://cran.rstudio.com/', dependencies = TRUE)
Some things are still not working as expected but it's a step forward.
EDIT:
this approach does not work since the system keeps using the old g++. I ended up using the docker image centos/devtoolset-7-toolchain-centos7:latest.
After install.packages("Rmpfr") I'm getting this error
configure: error: Header file mpfr.h not found; maybe use
--with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ‘Rmpfr’
I typed the suggestion --with-mpfr-include=INCLUDE_PATH into the terminal w/o success.
Look here: https://github.com/cran/Rmpfr
You first have to install the dependend libraries.
sudo apt-get install libmpfr-dev
sudo su - -c "R -e \"install.packages('Rmpfr', repos='http://cran.rstudio.com/')\""
It is also a better solution to install the R-Packages from the console, not inside R, since every user on the machine will have access to the package then. Otherwise it will just be in your personal library.
I tried to install "xlsx" package using Rstudio, and i couldn't install it.
I am trying to install my packages using install.packages("xlsxjars"). I already tried doing that from Tools window in Rstudio app, and I tried using the console.
I am using Linux (Gnome 17.04). I get this error:
input
install.packages("xlsxjars")
output
Installing package into ‘/home/aim/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz'
Error in install.packages : error reading from connection
if you get some Errors while installing r packages kind of somthing.so is miising or some packages are missing depending on the version of R, you should try this commands because, i had this kind of errors with R 3.0.x in Ubuntu 14.04
so i upgrade my R version to fix it with the following commands :
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" »
gpg —keyserver keyserver.ubuntu.com —recv-key E084DAB9
gpg -a —export E084DAB9 | sudo apt-key add -
sudo apt-get —purge remove r-base-core
sudo apt-get update
sudo apt-get -y install r-base
sudo apt-get update
now i can install all packages without errors
I totally agree with the answer of #kissi salim yahia
Just want to add . When you tape in R
install.packages("your_package")
you got some dependencies below.
these one may have troubles sometimes. So just need to install them manually from the SHELL like:
sudo apt-get install r-cran-your_dependencie
I spent a while struggling with that too. Eventually I just gave up as the java in that package was out of date and I would have needed to load older Java up to get it to run. I would suggest readxl instead.
A simple intro to the package can be found here: https://www.datacamp.com/community/tutorials/r-tutorial-read-excel-into-r#readxl
I created a new ubuntu-16.04.2-desktop-amd64 machine on VM VirtualBox and I want to be able to use the R environment with Rmpi.
Both of the below approaches gives a similar error.
Updated simplified pre-build binary approach:
When Ubuntu had installed I opened a terminal and executed the following commands:
~$ sudo apt-get update
~$ sudo apt-get install openmpi-bin
~$ sudo apt-get install r-base
~$ sudo apt-get install r-cran-rmpi
~$ R
This opened the R terminal and I invoking the follow function which resulted in an error:
> library(Rmpi)
libmpi.so: cannot open shared object file: No such file or directory
Error : .onLoad failed in loadNamespace() for 'Rmpi', details:
call: fun(libname, pkgname)
error: Cannot start MPI_Init(). Exit
Error: package or namespace load failed for ‘Rmpi’
Alternative approaches that I have attempted include using a local OpenMPI installation and using the R function install.packages to install the Rmpi package (see below). These all resulted in the same error.
I have also tried using MPICH by substituting ~$ sudo apt-get install mpich as the second command in the above procedure (including using the R function for installing the package) which results in an even more onerous runtime error.
Does anyone know what I have done wrong or what I can do to resolve this installation error?
Or alternatively, have anyone been able to successfully install a VirtualBox machine with Rmpi using any Linux distro or an image with pre-installed components?
Original local installation approach:
I have followed the instructions on this blog to download OpenMPI version 2.1.0, compile and install it. However when I try to install the package in R with:
> install.packages("Rmpi", configure.args =
c("--with-Rmpi-include=/home/jormunr/openmpi/include",
"--with-Rmpi-libpath=/home/jormunr/openmpi/lib",
"--with-Rmpi-type=OPENMPI",
"--with-mpi=/home/jormunr/openmpi/"))
it gives the following error
Error: .onLoad failed in loadNamespace() for 'Rmpi', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/jormunr/R/x86_64-pc-linux-gnu-library/3.2/Rmpi/libs/Rmpi.so':
libmpi.so.20: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
I can see that the 'libmpi.so.20' file is in the /home/jormunr/openmpi/lib that I provided as one of the parameter to the installation.
[Disclaimer: I am not a Linux expert and merely have user level skills. Any contributions or corrections from an expert will be greatly appreciated.]
Pre-build Binary Approach
Although trying various ways to install the prebuilt binaries I did not manage to get this option to work. This involved executing in the terminal the command 'sudo apt-get install r-cran-rmpi' to install the r-cran-rmpi prebuilt packages which also automatically installs the libopenmpi1.10 package that is a listed prerequisite. However, it appears that the file 'libmpi.so' is not included in the libopenmpi1.10 package but expected by the Rmpi library which causes an error in the R environment that it cannot find this file.
Local Installation Approach
The local installation did eventually succeed with a few amendments. I created a new ubuntu-16.04.2-desktop-amd64 VirtualBox image with default settings, except for 2048MB of memory and 32GB of hard drive space. When installed I opened a terminal and executed the commands from the Jovinge Lab website with the inclusion of the penultimate command which amends the run-time link editor's path and enables the install.package() function of R to find the 'libmpi.so' file. (also changed the version to 1.10.6 as this is the latest version release of version 1 – see below for version 2)
~$ cd /home/jormunr
~$ wget https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.2.tar.gz
~$ tar -zxvf openmpi-1.10.6.tar.gz
~$ cd openmpi-1.10.2
~$ ./configure --prefix=/home/jormunr
~$ make
~$ make install
~$ sudo apt-get install r-base
~$ export LD_LIBRARY_PATH=/home/jormunr/lib:$LD_LIBRARY_PATH
~$ R
This opens an R terminal and I invoked the function:
> install.packages("Rmpi", configure.args =
+ c("--with-Rmpi-include=/home/jormunr/include/",
+ "--with-Rmpi-libpath=/home/jormunr/lib/",
+ "--with-Rmpi-type=OPENMPI",
+ "--with-mpi=/home/jormunr/"))
This now executed without errors and I could test it with the following R statements:
> library("Rmpi")
> mpi.spawn.Rslaves()
master (rank 0, comm. 1) of size 2 is running on: Valhalla
slave1 (rank 1, comm. 1) of size 2 is running on: Valhalla
> mpi.close.Rslaves()
[1] 1
> mpi.quit()
When I tried this process with the OpenMPI Version 2.1.0 the installation completed successfully but the above test had issues; the mpi.spawn.Rslaves() function completed but mpi.close.Rslaves() did not complete – it never returned and the terminal was left hanging.
I experienced similar challenges. I landed on this solution where libopenmpi-dev was the secret.
sudo apt-get install openmpi-common openmpi-bin libopenmpi-dev r-base
sudo apt-get install r-cran-rmpi
sudo su
R
install.packages("doMPI", dependencies=TRUE)