1

I am installing rgdal in a docker container that also contains RShiny. I need some specific set of libraries for installing some packages, but also a downgraded version of the libraries for gdal. I found a solution:

aptitude install libgdal-dev libgdal1-dev libproj-dev libgdal1h libdap-dev

which offers a solution:

The following actions will resolve these dependencies:
     Keep the following packages at their current version:
1)     libdap-dev [Not Installed]                         
2)     libdapserver7 [Not Installed]                      
3)     libgdal-dev [Not Installed]                        
4)     libgdal1-dev [Not Installed]                       
5)     libgdal1h [Not Installed]
Accept this solution? [Y/n/q/?]                          

Which will non install anything, so I answer it n, and the offer a second alternative:

      Downgrade the following packages:                           
6)      build-essential [12.1 (now, unstable) -> 11.7 (stable)]   
7)      g++ [4:5.2.1-4 (now, unstable) -> 4:4.9.2-2 (stable)]     
8)      gcc [4:5.2.1-4 (now, unstable) -> 4:4.9.2-2 (stable)]     
9)      gfortran [4:5.2.1-4 (now, unstable) -> 4:4.9.2-2 (stable)]
10)     libstdc++6 [5.2.1-16 (now, unstable) -> 4.9.2-10 (stable)]

Which I accept with yand when it prompts again to confirm the list of the packages that will be installed I confirm again. As this is done interactively is not useful for a docker container, so my question is, How can I do this sequence programatically? Is there a way to write an aptitude script or something like that?

migrated from askubuntu.com Sep 11 '15 at 18:07

This question came from our site for Ubuntu users and developers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.