Results 1 to 4 of 4

Thread: help with apt-get: how to install package without prompting

  1. #1
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Beans
    24
    Distro
    Ubuntu

    help with apt-get: how to install package without prompting

    When I run 'apt-get install <some_package>' it asks you to enter configuration information for some packages.

    I'd like to be able to install a list of packages automatically without having to enter any information, ie. an automated installation.

    I looked in the man page for apt-get, and I was looking for maybe 2 possibilities:

    1) tell it not to require input; I'll download the configuration files later

    2) enter the options in the apt-get command.

    I found what _might_ be what's required for option (2), the --option, but I found the instructions for using it not understandable. It says 'The syntax is -o Foo::Bar=bar', but I don't know where to go from there, and I'm not even sure it's relevant to what I want to do.

    Can anyone advise?

    As an example, I want to install nslcd, and either sort out the configuration later (I have an ldap config file ready), or enter the ldap configuration along with the apt-get command. At present I have to enter the information interactively, which negates the possibility of an unattended install.

    Many thanks

  2. #2
    Join Date
    Aug 2009
    Location
    Charleston, SC (USA)
    Beans
    1,779

    Re: help with apt-get: how to install package without prompting

    Hi there!

    I believe this command will do the trick

    Code:
    export DEBIAN_FRONTEND=noninteractive
    then

    Code:
    sudo apt-get -q -y install <package_name>
    It will assume “yes” to everything (and do it quietly)

    EDIT:Debconf is the name of the tool. That page should help you get going with everything you want to know.


    ~Caboose
    Last edited by Kirboosy; August 26th, 2011 at 02:01 PM.
    "When our actions do not, our fears do make us traitors." -- Shakespeare
    "Unless someone like you cares a whole awful lot, nothing is going to get better. It's not!" -- Dr. Seuss


  3. #3
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Beans
    24
    Distro
    Ubuntu

    Smile Re: help with apt-get: how to install package without prompting

    Yep, that seems to work. Thanks.

  4. #4
    Join Date
    Aug 2009
    Location
    Charleston, SC (USA)
    Beans
    1,779

    Re: help with apt-get: how to install package without prompting

    Glad that worked. Could you please mark this thread as solved?

    Thanks
    ~Caboose
    "When our actions do not, our fears do make us traitors." -- Shakespeare
    "Unless someone like you cares a whole awful lot, nothing is going to get better. It's not!" -- Dr. Seuss


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •