1

For example, if I do:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5

I get gcc-5 but not gfortran-5 or cpp-5 or any of the other packages listed here. How to get all of those packages at once?

2 Answers 2

2

This awk '$1 == "Package:" { if (a[$2]++ == 0) print $2; }' /var/lib/apt/lists/*ubuntu-toolchain-r*test*Packages > to_install.txt will put all the packages into a text file.

You can manually edit this file to remove anything unwanted and use that file to feed it to apt-get like for i in $(cat to_install.txt); do sudo apt-get install $i; done. This last part will probably be a bad idea without confirming these packages are not conflicting with other packages in the PPA.


The normal way to do is write them out. So ...

sudo apt-get install gcc-5 g++-5 gfortran-5 gnat-5 

after having a quick look at the packages to see if they might have conflicts.

2
  • Thanks for the advice. I had no idea. So I will install them selectively.
    – user2413
    Oct 12, 2015 at 7:50
  • Pick the ones you need, have a quick look at the dependencies and than make a one-liner ;)
    – Rinzwind
    Oct 12, 2015 at 7:51
1

Via Y-PPA-Manager

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

  1. Start Y-PPA-Manager and select Manage PPAs

    enter image description here

  2. Select your PPA and click List packages

    enter image description here

  3. See the packages and install what you need via Install

    enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .