Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install all but one of the R packages which are currently in the Ubuntu repositories:

However, when I go to do so sudo apt-get install 'r-cran-*' I get an error:

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-cran-mass : Conflicts: r-cran-vr

Ok, so I want to ignore this conflict. How? I see the flag --ignore-missing, but this is a conflict? I don't see any options to --ignore-conflicted??

computer:~> sudo apt-get install 'r-cran-*' --ignore-conflict
E: Command line option --ignore-conflict is not understood
computer:~> sudo apt-get install 'r-cran-*' --ignore-conflicted
E: Command line option --ignore-conflicted is not understood
share|improve this question
    
Ps. There are 149 such packages. I do not want to enter them by hand! –  M. Tibbits Aug 19 '11 at 21:44
add comment

1 Answer

up vote 5 down vote accepted

Install aptitude , start the full-screen text mode interface, then select all the r-cran- packages. Most R packages are in the gnu-r section, and typing + on the section header will install all packages in the section. For more precise matching, press l to limit the display and enter ^r-cran- as the regexp, then press + on the “Not Installed Packages” line. You will get a conflict notice that you can resolve by pressing . a few times then ! to validate the solution.

You can use aptitude from the command line too. aptitude '~n^r-cran-.*' selects all the r-cran- packages for installation, then choose your desired conflict resolution.

If you don't want to use aptitude or want a non-interactive solution, you can generate the list of packages with apt-cache r-cran-, so:

apt-get install $(apt-cache r-cran- | grep -Fvx r-cran-vr)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.