R 3.5.0 installation packages for Ubuntu Xenial (16.04) do not yet exist on the ubuntu mirror sites. Is there an alternative method for updating R to 3.5.0 on ubuntu xenial? Alternatively, is there a different method to update R to 3.5.0?
Ubuntu – R 3.5.0 for Ubuntu
16.04rsoftware installation
Related Solutions
It's a bit of a hack but yes, this can be done. There is an undocumented step needed to actually start the service and (weirdly enough) unless you want to futz around with upstart job conversion manually, you need to install the Ubuntu mongodb
package first, then remove it so that you have a usable service. A straight install of the MongoDB packages will not give you a working service on a fresh 16.04.
Update - July 2016: The official fix for this (adding support for 16.04 to the packages) has been completed in the 3.3 dev branch as part of SERVER-23043 - and has been released as a backport in the 3.2 series as part of 3.2.7. Hence, if you are using 3.2.7+ you do not need to do this and the official MongoDB package install should just work.
In any case, after doing the add/remove, follow the usual instructions for 14.04, summarized here:
# install the Ubuntu package (to get the service set up correctly)
sudo apt-get install mongodb
# Now remove it and continue with the MongoDB instructions
sudo apt-get remove mongodb
sudo apt-get autoremove
# import key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# add trusty repos
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
# update apt
sudo apt-get update
# install the MongoDB package
sudo apt-get install -y mongodb-org
The install succeeds, and thanks to the Ubuntu package we have all the pieces needed for a service, but attempting to start the service will initially fail:
$ sudo service mongodb start
Failed to start mongodb.service: Unit mongodb.service is masked.
Fixing this is not too hard:
$ sudo systemctl unmask mongodb
Removed symlink /etc/systemd/system/mongodb.service.
Now we can enable/start the service, get its status etc.
$ sudo service mongodb enable
$ sudo service mongodb start
$ sudo service mongodb status
● mongodb.service - LSB: An object/document-oriented database
Loaded: loaded (/etc/init.d/mongodb; bad; vendor preset: enabled)
Active: active (running) since Thu 2016-04-14 16:40:35 IST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 2849 ExecStart=/etc/init.d/mongodb start (code=exited, status=0/SUCCESS)
Main PID: 1593 (code=exited, status=0/SUCCESS)
Tasks: 13 (limit: 512)
Memory: 51.9M
CPU: 100ms
CGroup: /system.slice/mongodb.service
└─2861 /usr/bin/mongod --config /etc/mongodb.conf
Success - and we get a nice pointer to the active config file (which is in the old key=value
format, see here for examples in the newer recommended YAML format).
Note: There will actually be two config files /etc/mongod.conf
and /etc/mongodb.conf
thanks to slight differences between the two packages we have installed. The now-active service points to the old-format one by default /etc/mongodb.conf
- you can switch by moving/copying the mongod.conf
to mongodb.conf
if you so wish, or simply edit the file directly.
Once started, to test, connect to the database with the mongo
shell:
$ mongo
MongoDB shell version: 3.2.5
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten]
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-04-14T16:40:34.962+0100 I CONTROL [initandlisten]
If you wish to get rid of the THP warnings, check out this answer.
The rabbitvcs
package is within the official repositories so remove the ppa's again and make sure your /etc/apt/sources.list
looks like this. Then do:
sudo apt-get install rabbitvcs*
If you run into following error:
IOError: [Errno 13] Permission denied: '/home/username/.config/rabbitvcs/settings.conf
simply correct the permissions by :
sudo chown "$USER" .config/rabbitvcs -R
Best Answer
R 3.5 are currently only available from a PPA, because some of CRAN's packages have problems building with R 3.5.
Proceed at your own risk.
The procedure that worked for me is:
Remove all
r-cran-*
packages from your system (YMMV, I'm usually installing packages from source and have very few of these)dpkg -l | grep r-cran-
Add Michael Rutter's PPA:
Upgrade R
Install all packages you need from source (to a personal or site library via
install.packages()
) or by installing the correspondingr-cran-*
Ubuntu package.I use the following script to reinstall all packages my packages from my personal site library for R 3.4:
If you have a machine with multiple CPUs, you can speed up the process, for example:
References
Reply by Dirk Eddelbuettel to a similar inquiry on the R-SIG-Debian mailing list
Related SO question