R BayesVarSel on Ubuntu installation - r

I'm trying to install the BayesVarSel package on a ubuntu 12 box on AWS EC2. It works fine on my windows 7 machine (R 2.15.1).
I've attached a screenshot of the error message. It appears to be an issue with the GNU GSL library. I couldn't find a quick way to install GSL (ie sudo apt-get GSL, etc.) so I wanted to see if others have had a similar issue. I'm open to other packages with similar functionality.
EDIT:
A couple other things I've tried without luck :

I was able to recreate the error with Ubuntu 12.04.1 LTS (desktop) running in VirtualBox.
As #Dirk Eddelbuettel suggested, sudo apt-cache search libgsl produced a useful list of packages. It's not clear why that didn't work on your machine.
I installed libgsl with:
sudo apt-get install libgsl0ldbl
sudo apt-get install libgsl0-dev
Now BayesVarSel compiles and loads without error.

Do
apt-cache search libgsl
and everything should be a little clearer. Those packages have existed longer than either Ubuntu or Amazon EC2 so it really should not take superhuman effort to find them.
And if apt-cache search libgsl is too difficult, try packages.ubuntu.com
where you can search for the package containing the file in your error message (eg /usr/include/gsl/gsl_vector.h) and "Yes, Veronica" you can search for substrings too.

On Fedora the required package can be installed with dnf install gsl-devel.

Related

Unable to install the tidyverse

There is no package called 'tidyverse' is the error message I get after doing this:
install.packages('tidyverse', dependencies = T);
install.packages('DBI', dependencies = T);
library(DBI);
library(tidyverse);
I use Ubuntu 18.04 and Rstudio.
Could anyone sort me out here, please?
You may find this blog post and associated video useful -- it shows how to install all of tidyverse on Ubuntu directly from prebuilt binaries with one command.
In short, that is what PPAs are good for. The associate slides have the relevant commands.
And once you do the required step of adding the two PPAs and running sudo apt-get update (again, both detailed in the slides) then all it takes is a single sudo apt-get install r-cran-tidyverse as the video shows.
Added bonus: because you install binaries that pre-made it is the fastest possible installation.
Edit three years later: We now have r2u which thanks to its use of bspm plus its complete set of CRAN binaries lets you just use install.packages("tidyverse") to install all packages as binaries along with all dependencies in a matter of seconds as shown in a few gifs on the site, my blog, and elsewhere. Plus anybody can try it in the browser via gitpod from the r2u site.
The default setup in R on Linux is to compile packages from source since CRAN only provides binaries for macOS and Windows. This is not the recommended way to install packages on Ubuntu. As pointed out by #DirkEddelbuettel in his edit to his answer, you can use r2u and bspm to obtain binaries for all CRAN packages. This will require initial setup but result in a much better user experience. If you insist on compiling the tidyverse yourself, my old answer remains below.
Old answer
tidyverse has external dependencies that cannot be installed through R and that aren't preinstalled in Ubuntu. Install the following packages via the terminal:
sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev
Run install.packages("tidyverse") again after that.
You can find more help regarding this here.

Offline r-base installation on SLES12.3

We need to install R-base version 3.5+ on an offline machine running SLES12.3
We have downloaded all the packages from the the SUSE r repo
http://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_12.3/x86_64/
while running zypper install on the packages there are additional dependencies that we are not able to find the relevant packages to download.
These include:
libtcl8.5.so()(64bit)
libgomp.so.l()(64bit)
But we are not able to find the dependency package that include these libraries.
What should be the correct approach for installing these libraries offline? where can we find these libraries?
Is there a better way for offline installing R-base ? we tried to follow the instructions on the cran rstudio page
The files you downloaded don't match the distribution you're running. SUSE Linux Enterprise (SLE) and openSUSE are similar in some ways, but these are really two separate distributions and you can not always mix binaries between the two. To install R on SLE Server 12.3, you should use the repository https://download.opensuse.org/repositories/devel:/languages:/R:/released/SLE_12/.
You can find out these URLs by looking at the right hand-side column at https://build.opensuse.org/project/show/devel:languages:R:released. Look for things called "SLE" there.
Install the Development Tools, according to this answer
zypper install --type pattern Basis-Devel
Download R source and install it
wget http://cran.univ-paris1.fr/src/base/R-3/R-3.5.0.tar.gz
tar zxf R-3.5.0.tar.gz
cd R-3.5.0
./configure --enable-R-shlib
make
make check
make install
Maybe there are still dependencies missing, which need to be installed with zypper (I don't have any Suse to try myself). With this method you have an "empty" R and you will install R packages one by one (with R CMD INSTALL). Maybe not the best answer for your need, but an answer.

Unable to locate package libvirt-clients error on ubuntu

I am seeing the below error when deploying devstack (openstack) on ubuntu:
E: Unable to locate package libvirt-clients
E: Unable to locate package libvirt-daemon-system
Any clues pls ?
I have this problem too and i use ubuntu trusty
according to this commit:
https://github.com/openstack-dev/devstack/commit/03fbc0d71bf4ee85820999ef1324dc319ef9d926?diff=split
they changed the repo packages 5 days ago and just for ubuntu xenial its the same as before : "install_package libvirt-bin libvirt-dev"
but other distros: "install_package libvirt-clients libvirt-daemon-system libvirt-dev"
I think we could better edit the file manually until better changes take place.
You're probably trying to install Devstack it on an unsupported version of Linux. Try Ubuntu 16.0.4 (worked for my today without a single problem) or the one that the installation guide says is supported.
Try sudo apt install qemu qemu-kvm virt-manager for more information check this out on github.

Error message installing Cairo package in R

I want to install the Cairo package in R using:
install.packages("Cairo")
Unfortunately this doesn't work. The error message is following:
xlib-backend.c:34:74: fatal error: X11/Intrinsic.h: No such file or directory
compilation terminated.
make: *** [xlib-backend.o] Error 1
ERROR: compilation failed for package ‘Cairo’
* removing ‘/home/magnus/R/x86_64-pc-linux-gnu-library/3.1/Cairo’
Does anybody have an answer for this problem? I couldn't find any help in the internet so far.
Many thanks in advance!
Yours,
broesel
For me (Ubuntu 15.04) installing libxt-dev solved the problem.
(I know it's mentioned in comments above, but thought it might be good to have it in answers as well)
You need the development header as the file Intrinsic.h is not found.
For the related package cairoDevice (which I maintain for Debian), I ensure the following is installed:
libgtk2.0-dev, libcairo2-dev, xvfb, xauth, xfonts-base
If you are on a different distribution these might be called something else. The key is that the Gtk and Cairo header packages also pull in other, needed, x11 packages.
libXt-devel needs to be installed in Fedora (25):
sudo dnf install libXt-devel
On a Mac, my problems were solved once I installed libxt
brew install libxt
Similar, I'm sure to https://stackoverflow.com/a/41455437/61728
Along with the packages libgtk2.0-dev, libcairo2-dev, xvfb, xfonts-base and xauth that Dirk mentioned in the above comment , I also installed libxt-dev (after Magnus' comment) after which I was able to install Cairo in R. I am using Ubuntu 16.04 LTS
I had a lot of trouble with this, for some reason this didn't work
apt-get install libx11-dev libxt-dev libgtk2.0-dev libcairo2-dev xvfb xauth xfonts-base -y
but when I ran this immediately afterwards (even though it was already installed above), then the Cairo R package installed successfully. Not exactly sure why but thought I'd put it here in case it helps someone.
apt-get install libcairo2-dev -y
I used this:
devtools::install_github("jcassiojr/BayesPeak")
then:
library("BayesPeak")
And worked.
Paulo

upgrade R 2.7.1 on Debian core procedure

My R version is 2.7.1 (on Debian) and some packages are asking for > 2.10. I cannot find updating instructions and I don't want to remove and reinstall as I have other things depending on R and I don't want to mess up. Is there an update procedure?
Closest thing to my problem is on this thread.
check out the instructions for installing from source. Its easy on a Linux box, and you can do the install in any directory you like, you dont even need superuser permissions. Once compiled you can even run R from that directory without messing up any system-installed R. As long as you give the full path to R's binary, or put the path to it in your PATH environment variable, when starting it it will work fine.
FYI
It seems that R on Debian with versions previous to 2.7.1 cannot be updated.
The current core runs from 2.7.1 up. The only way to do it is to remove the existing version.
As this was not straight forward I post it here. If you have Rapache or other things connecting to R disable them with dismode or related.
apt-get purge r-base r-base-dev
I had to do this as well
dpkg -P r-base-core
until this shows no more installed R packages
dpkg -l r-*
Then follow the instruction from http://cran.r-project.org/bin/linux/debian/, with the amendment that you should use deb instead of deb-src in /etc/apt/sources.list.
deb http://<favorite-cran-mirror>/bin/linux/debian lenny-cran/
Before installing run this and it should not say 2.7.1.
apt-cache policy r-base-dev

Resources