Installing things on Linux is either really easy, or a yak shave with surprisingly little between those extremes.
It seems that Ubuntu 16.10 has removed Gstreamer 0.10 from the repos and replaced it with Gstreamer 1.0, which is great… until you need to install R-Studio.
While the R-Studio people are aiming to drop the Gstreamer dependency, for the moment, as of 16.10, installing it has fallen into the yak-shave category.
Installing R-Studio works fine, but if you try to run (from the terminal) it you will get the error:
rstudio: error while loading shared libraries: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory
We can see that it’s failing to load Gstreamer, but since it’s been removed from the Ubuntu repos fixing this will mean getting those packages elsewhere.
To start with, we can download the latest R-studio daily build and install it using dpkg
:
$ wget https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-1.0.124-amd64.deb $ sudo dpkg -i rstudio-1.0.124-amd64.deb
The dpkg
command can also query the package to display information about it. If we use the uppercase I option we can confirm that this package requires exactly version 0.10 of libgstreamer
:
dpkg -I rstudio-1.0.124-amd64.deb new debian package, version 2.0. size 98840122 bytes: control archive=42847 bytes. 554 bytes, 12 lines control 163246 bytes, 1548 lines md5sums 198 bytes, 10 lines * postinst #!/bin/sh 158 bytes, 10 lines * postrm #!/bin/sh Package: rstudio Version: 1.0.124 Section: devel Priority: optional Architecture: amd64 Depends: libjpeg62, libedit2, libgstreamer0.10-0, libgstreamer-plugins-base0.10-0, libssl1.0.0, libc6 (>= 2.7) Recommends: r-base (>= 2.11.1) Installed-Size: 526019 Maintainer: RStudio <info@rstudio.com> Description: RStudio RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Debian (which Ubuntu is based on) has the old Gstreamer packages we need to satisfy those dependencies, so we can get them from there. If you need something other than the AMD64 see here and here. The if you have a 64bit machine, you can download and install like this:
# download with wget $ wget http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb $ wget http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb # Now install with dpkg $ sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb $ sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
While that solves R’s problems, we now have one of our own. We’ve purposefully installed old packages and don’t want Ubuntu’s package manager to enthusiastically upgrade them next time we update.
To resolve that problem will put a hold on them with apt-mark
:
$ sudo apt-mark hold libgstreamer-plugins-base0.10-0 libgstreamer-plugins-base0.10-0 set on hold. $ sudo apt-mark hold libgstreamer0.10 libgstreamer0.10-0 set on hold.
And we can check the packages that are on hold with:
$ sudo apt-mark showhold libgstreamer-plugins-base0.10-0 libgstreamer0.10-0
Hopefully that saves someone some Googling.
Now that’s working, it’s time to play with some R!
Thanks Mike, finally a solution that works for me! Posted a summary and link on Stackoverflow:
http://stackoverflow.com/a/40938717/7112525
Very helpful, thanks!
Not sure why you recommended the daily build, but I just used the latest recommended stable thing and the directions worked fine anyway.
Amazingly! Thank you very much! Finally I found out (after search half a day) how to properly install RStudio on Ubuntu 16.10.
Thank you so much!
Thank you so much!
I just installed Budgie and i need rstudio
Many thanks
Thanks a lot!
Thank you Mike. Very helpful.
Thanks! Mike.
Perfect! Thanks.
Thanks! Works with 17.04 too.
You’ve just saved me a lot of time mate, thank you so much!
Thank you!!!!
Much appreciated. Thankyou!
Thank you very very much. It worked !!!.
Thank you, thank you, thank you… Since I crash my already shaky 16.04 this afternoon by opening one too many jars of worms, I’ve spent way too much time trying to salvage the situation before deciding I’d just scrap everything and install 17.04.
It’s now 1am and I discover, of all things, RStudio doesn’t install….
Thanks for your post…. it made a bad day a bit better!
Hey man! I have been trying to fix this problem, finally, your solution worked out! thanks a lot !!!
Thanks so much!
Thank you mike, you saved me a lot of time.
Thank you it was amazing
Wonderful! Thank you very much!!!
Thank you very much!! I had to adapt the code accordingly since i’m on i386, but it worked nonetheless. I’m grateful!!