Installing latest version of R-base
I have been unsuccessfully trying to install the latest version (2.15.2) of r-base. Apparently, R package Rcpp would not install for R version 2.14.1 - the version that installs for me.
I am not sure what/how/where to change my installation attempts which appear below. Please note that I am using ubuntu-12.04.1-server-i386.
The current installed version is R version 2.14.1 (2011-12-22):
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version.
Including version information doesn't help:
$ sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found
Changes based on CRAN Ubuntu instructions from http://cran.r-project.org/bin/linux/ubuntu/README:
Added to
/etc/apt/sources.list
deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/
Update and install
$ sudo apt-get update
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.15.2-1quantal2) but it is not going to be installed
Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt software-installation r
add a comment |
I have been unsuccessfully trying to install the latest version (2.15.2) of r-base. Apparently, R package Rcpp would not install for R version 2.14.1 - the version that installs for me.
I am not sure what/how/where to change my installation attempts which appear below. Please note that I am using ubuntu-12.04.1-server-i386.
The current installed version is R version 2.14.1 (2011-12-22):
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version.
Including version information doesn't help:
$ sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found
Changes based on CRAN Ubuntu instructions from http://cran.r-project.org/bin/linux/ubuntu/README:
Added to
/etc/apt/sources.list
deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/
Update and install
$ sudo apt-get update
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.15.2-1quantal2) but it is not going to be installed
Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt software-installation r
Have you triedsudo apt-get upgradeorsudo apt-get dist-upgrade?
– Salem
Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46
add a comment |
I have been unsuccessfully trying to install the latest version (2.15.2) of r-base. Apparently, R package Rcpp would not install for R version 2.14.1 - the version that installs for me.
I am not sure what/how/where to change my installation attempts which appear below. Please note that I am using ubuntu-12.04.1-server-i386.
The current installed version is R version 2.14.1 (2011-12-22):
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version.
Including version information doesn't help:
$ sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found
Changes based on CRAN Ubuntu instructions from http://cran.r-project.org/bin/linux/ubuntu/README:
Added to
/etc/apt/sources.list
deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/
Update and install
$ sudo apt-get update
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.15.2-1quantal2) but it is not going to be installed
Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt software-installation r
I have been unsuccessfully trying to install the latest version (2.15.2) of r-base. Apparently, R package Rcpp would not install for R version 2.14.1 - the version that installs for me.
I am not sure what/how/where to change my installation attempts which appear below. Please note that I am using ubuntu-12.04.1-server-i386.
The current installed version is R version 2.14.1 (2011-12-22):
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version.
Including version information doesn't help:
$ sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found
Changes based on CRAN Ubuntu instructions from http://cran.r-project.org/bin/linux/ubuntu/README:
Added to
/etc/apt/sources.list
deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/
Update and install
$ sudo apt-get update
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.15.2-1quantal2) but it is not going to be installed
Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt software-installation r
apt software-installation r
edited Oct 12 '17 at 9:07
muru
1
1
asked Nov 18 '12 at 2:38
Student
171125
171125
Have you triedsudo apt-get upgradeorsudo apt-get dist-upgrade?
– Salem
Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46
add a comment |
Have you triedsudo apt-get upgradeorsudo apt-get dist-upgrade?
– Salem
Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46
Have you tried
sudo apt-get upgrade or sudo apt-get dist-upgrade?– Salem
Nov 18 '12 at 4:35
Have you tried
sudo apt-get upgrade or sudo apt-get dist-upgrade?– Salem
Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46
add a comment |
5 Answers
5
active
oldest
votes
None of the above worked for me so I am copying the answer from https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0
Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
Which worked for me
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R withrm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory
– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
Why do you uninstall before upgrading? Why do you needppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.
– arekolek
Feb 16 '16 at 12:29
add a comment |
Here's how I did it;
As already mentioned in the question, I went through the steps in UBUNTU PACKAGES FOR R instructions to add the repository, and did a apt-get update, and then
apt-cache showpkg r-base
which would give something like
Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
and the I did a
sudo apt-get install -f r-base=3.0.2-1raring0
and done.
add a comment |
open the terminal and type sudo -s. Then open source.list by typing:
gedit /etc/apt/sources.list
then, add these lines to the file:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
then save& exit gedit. In the terminal type
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
then type
exit
then type these commands --one line at a time--.
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
1
Why are you adding the linedeb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/twice?
– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
add a comment |
In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.
Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.
Hope this helps.
add a comment |
One thing I noticed, if you follow instructions on various R-websites, these will make you add a line to the Linux sources list /etc/apt/sources.list
See, for example, this link: https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
However, some Linux distros add a line to a separate file in this folder:
/etc/apt/sources.list.d
This can lead to the you have held broken packages error message.
I commented-out the line (/etc/apt/sources.list) in /etc/apt/sources.list, and added the correct R-repository using the Software Sources manager of my distro (Linux Mint 18.3)
This solved the problem.
add a comment |
protected by Community♦ Jun 12 '15 at 9:45
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
None of the above worked for me so I am copying the answer from https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0
Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
Which worked for me
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R withrm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory
– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
Why do you uninstall before upgrading? Why do you needppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.
– arekolek
Feb 16 '16 at 12:29
add a comment |
None of the above worked for me so I am copying the answer from https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0
Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
Which worked for me
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R withrm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory
– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
Why do you uninstall before upgrading? Why do you needppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.
– arekolek
Feb 16 '16 at 12:29
add a comment |
None of the above worked for me so I am copying the answer from https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0
Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
Which worked for me
None of the above worked for me so I am copying the answer from https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0
Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
Which worked for me
edited Oct 12 '17 at 9:04
muru
1
1
answered Mar 19 '14 at 17:16
user304497
48946
48946
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R withrm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory
– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
Why do you uninstall before upgrading? Why do you needppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.
– arekolek
Feb 16 '16 at 12:29
add a comment |
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R withrm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory
– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
Why do you uninstall before upgrading? Why do you needppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.
– arekolek
Feb 16 '16 at 12:29
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
That also worked for me (12.04).
– Ioannis
Jun 13 '14 at 13:03
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
I am using ubuntu 12.10 and it does not work. I still face the same issue
– Arun Raja
Nov 14 '15 at 3:55
This post might be getting a little outdated. In general, remove your old R with
rm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory– user304497
Jan 6 '16 at 11:11
This post might be getting a little outdated. In general, remove your old R with
rm -rf /usr/local/lib/R, download the latest tarball from r-project.org, extract it and follow the instructions in 'INSTALL' in the top-level directory– user304497
Jan 6 '16 at 11:11
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
Still a problem, and still works on "Trusty". Thanks!
– AdamO
Jan 30 '16 at 4:03
6
6
Why do you uninstall before upgrading? Why do you need
ppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.– arekolek
Feb 16 '16 at 12:29
Why do you uninstall before upgrading? Why do you need
ppa:marutter/rdev? The rest should be enough, here's official documentation for Ubuntu repositories.– arekolek
Feb 16 '16 at 12:29
add a comment |
Here's how I did it;
As already mentioned in the question, I went through the steps in UBUNTU PACKAGES FOR R instructions to add the repository, and did a apt-get update, and then
apt-cache showpkg r-base
which would give something like
Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
and the I did a
sudo apt-get install -f r-base=3.0.2-1raring0
and done.
add a comment |
Here's how I did it;
As already mentioned in the question, I went through the steps in UBUNTU PACKAGES FOR R instructions to add the repository, and did a apt-get update, and then
apt-cache showpkg r-base
which would give something like
Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
and the I did a
sudo apt-get install -f r-base=3.0.2-1raring0
and done.
add a comment |
Here's how I did it;
As already mentioned in the question, I went through the steps in UBUNTU PACKAGES FOR R instructions to add the repository, and did a apt-get update, and then
apt-cache showpkg r-base
which would give something like
Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
and the I did a
sudo apt-get install -f r-base=3.0.2-1raring0
and done.
Here's how I did it;
As already mentioned in the question, I went through the steps in UBUNTU PACKAGES FOR R instructions to add the repository, and did a apt-get update, and then
apt-cache showpkg r-base
which would give something like
Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
Description Language:
File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
and the I did a
sudo apt-get install -f r-base=3.0.2-1raring0
and done.
answered Oct 1 '13 at 20:24
arsaKasra
1,82611015
1,82611015
add a comment |
add a comment |
open the terminal and type sudo -s. Then open source.list by typing:
gedit /etc/apt/sources.list
then, add these lines to the file:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
then save& exit gedit. In the terminal type
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
then type
exit
then type these commands --one line at a time--.
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
1
Why are you adding the linedeb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/twice?
– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
add a comment |
open the terminal and type sudo -s. Then open source.list by typing:
gedit /etc/apt/sources.list
then, add these lines to the file:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
then save& exit gedit. In the terminal type
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
then type
exit
then type these commands --one line at a time--.
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
1
Why are you adding the linedeb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/twice?
– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
add a comment |
open the terminal and type sudo -s. Then open source.list by typing:
gedit /etc/apt/sources.list
then, add these lines to the file:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
then save& exit gedit. In the terminal type
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
then type
exit
then type these commands --one line at a time--.
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
open the terminal and type sudo -s. Then open source.list by typing:
gedit /etc/apt/sources.list
then, add these lines to the file:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
then save& exit gedit. In the terminal type
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
then type
exit
then type these commands --one line at a time--.
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
edited Feb 24 '16 at 20:07
answered Jan 23 '13 at 13:31
user2413
3,922133962
3,922133962
1
Why are you adding the linedeb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/twice?
– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
add a comment |
1
Why are you adding the linedeb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/twice?
– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
1
1
Why are you adding the line
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/ twice?– Cyrille
Feb 24 '16 at 19:49
Why are you adding the line
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/ twice?– Cyrille
Feb 24 '16 at 19:49
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
@Cyrille: typo, fixed it, thanks!
– user2413
Feb 24 '16 at 20:07
add a comment |
In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.
Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.
Hope this helps.
add a comment |
In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.
Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.
Hope this helps.
add a comment |
In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.
Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.
Hope this helps.
In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.
Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.
Hope this helps.
answered Nov 20 '12 at 16:56
Salem
17.1k65083
17.1k65083
add a comment |
add a comment |
One thing I noticed, if you follow instructions on various R-websites, these will make you add a line to the Linux sources list /etc/apt/sources.list
See, for example, this link: https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
However, some Linux distros add a line to a separate file in this folder:
/etc/apt/sources.list.d
This can lead to the you have held broken packages error message.
I commented-out the line (/etc/apt/sources.list) in /etc/apt/sources.list, and added the correct R-repository using the Software Sources manager of my distro (Linux Mint 18.3)
This solved the problem.
add a comment |
One thing I noticed, if you follow instructions on various R-websites, these will make you add a line to the Linux sources list /etc/apt/sources.list
See, for example, this link: https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
However, some Linux distros add a line to a separate file in this folder:
/etc/apt/sources.list.d
This can lead to the you have held broken packages error message.
I commented-out the line (/etc/apt/sources.list) in /etc/apt/sources.list, and added the correct R-repository using the Software Sources manager of my distro (Linux Mint 18.3)
This solved the problem.
add a comment |
One thing I noticed, if you follow instructions on various R-websites, these will make you add a line to the Linux sources list /etc/apt/sources.list
See, for example, this link: https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
However, some Linux distros add a line to a separate file in this folder:
/etc/apt/sources.list.d
This can lead to the you have held broken packages error message.
I commented-out the line (/etc/apt/sources.list) in /etc/apt/sources.list, and added the correct R-repository using the Software Sources manager of my distro (Linux Mint 18.3)
This solved the problem.
One thing I noticed, if you follow instructions on various R-websites, these will make you add a line to the Linux sources list /etc/apt/sources.list
See, for example, this link: https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
However, some Linux distros add a line to a separate file in this folder:
/etc/apt/sources.list.d
This can lead to the you have held broken packages error message.
I commented-out the line (/etc/apt/sources.list) in /etc/apt/sources.list, and added the correct R-repository using the Software Sources manager of my distro (Linux Mint 18.3)
This solved the problem.
answered Dec 23 '18 at 3:16
Martien Lubberink
1312
1312
add a comment |
add a comment |
protected by Community♦ Jun 12 '15 at 9:45
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Have you tried
sudo apt-get upgradeorsudo apt-get dist-upgrade?– Salem
Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version.
– Student
Nov 19 '12 at 16:46