Results 1 to 2 of 2

Thread: unable to extract program

  1. #1
    Join Date
    Mar 2021
    Beans
    7

    unable to extract program

    Ubuntu 20.04.02
    Virtual box 6.1
    Admin privileges

    Download GO from their website to /downloads/

    Ran following command

    sudo -i rm -rf /usr/local/go && tar -C /usr/local -xzf /home/johngalt/Downloads/go1.16.3.linux-amd64.tar.gz

    receive these errors
    1. cannot mkdir: permission deniedtar --help
    2. exiting with failure status due to previous errors

  2. #2
    Join Date
    Dec 2014
    Beans
    1,741

    Re: unable to extract program

    That command is actually two commands separated by '&&' which means 'execute the following command if the previous one succeeded'. Since you're trying to extract a tar archive into a directory that belongs to root and that nobody else can write to, you need to use sudo for the tar-command too.
    Code:
    sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf /home/johngalt/Downloads/go1.16.3.linux-amd64.tar.gz
    


    Two more things:

    • You might have mentioned what the program is, where you got it from and that the command you're trying to use is part of the official installation instructions, would have saved me a round trip to duckduckgo searching for the file name. Besides the programming language there's also a very well known board game of which there are multiple implementations and who knows what else might call itself 'go' ...
    • If you don't need the latest and greatest, there's a somewhat older version of go in the repositories. Search for 'golang' on packages.ubuntu.com (or use 'apt search golang').


    Holger


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
  •