Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Need help: Automatically accept EULA with apt-get

  1. #1
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    15
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Need help: Automatically accept EULA with apt-get

    I need apt-get to automatically accept the licence agreement for Sun Java 6, which will be part of a script that generates amazon ec2 images. The rest of the script is all set, and this is the only thing that I need. Any help is appreciated

  2. #2
    Join Date
    Dec 2006
    Beans
    Hidden!
    Distro
    Ubuntu Intrepid Ibex (testing)

    Re: Need help: Automatically accept EULA with apt-get

    sudo apt-get -y install sun-java6-bin
    Creativity is allowing yourself to make mistakes; art is knowing which ones to keep.

  3. #3
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    15
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need help: Automatically accept EULA with apt-get

    that's what i though at first too, but -y is only for apt-get itself, for instance overwriting config files. I tried it, and it doesn't touch the EULA. thanks for the reply.

  4. #4
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Need help: Automatically accept EULA with apt-get

    When you install the EULA should come up. Scroll through it, hit the tab key, hit enter.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  5. #5
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    15
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need help: Automatically accept EULA with apt-get

    is there some way that i could input the "tab" and "enter" keys in the bash script??? I need the eula to be accepted automatically with no user input.

  6. #6
    Join Date
    Dec 2006
    Beans
    Hidden!
    Distro
    Ubuntu Intrepid Ibex (testing)

    Re: Need help: Automatically accept EULA with apt-get

    I was certain another java install script posted on this forum used a similar function with --yes

    Might have better luck doing a search here, I cant seem to find the exact one.
    Creativity is allowing yourself to make mistakes; art is knowing which ones to keep.

  7. #7
    Join Date
    Oct 2005
    Location
    Oklahoma
    Beans
    427

    Re: Need help: Automatically accept EULA with apt-get

    For scripting bash you might look into expect or something similar. http://www.kdab.net/~dfaure/scripts.html

    The sun-java6-* packages look for the presence of a file to indicate that the license has been accepted. If you pre-create that file your install will probably succeed.

    Or, you might consider the openjdk-6 packages. On the server side they are _highly_ compatible with the sun-java6 packages.

    Regards,

    -james.

  8. #8
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    15
    Distro
    Ubuntu 10.04 Lucid Lynx

    Smile Re: Need help: Automatically accept EULA with apt-get

    thank you for the replies. As of yet, i still haven't found a solution, but please keep posting as I feel that there are many who will find this useful.

  9. #9
    Join Date
    Feb 2009
    Beans
    1

    Re: Need help: Automatically accept EULA with apt-get

    DEBIAN_FRONTEND=noninteractive apt-get install -y java5-sun-jre || :
    debconf 'echo SET shared/accepted-sun-dlj-v1-1 true; echo $(read) >&2'
    apt-get install -y java5-sun-jre

    I so much hate dpkg for botching up this license stuff and taking 40 minutes of my life now...

  10. #10
    Join Date
    Mar 2007
    Location
    Melbourne, FL
    Beans
    99
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Need help: Automatically accept EULA with apt-get

    You can echo a tab in bash shells using:
    Code:
    echo $'\t'
    
    \n = newline
    \r = return
    \t = tab
    \v = vertical tab
    \b = backspace
    \a = "alert" (beep or flash)
    -or- 
    ASCII octal equivalent of 0xx
    \0xx
    Disclaimer: Aint nuthin right in my left brain and nuthin left in the right

Page 1 of 2 12 LastLast

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
  •