skip to Main Content

While installing Docker Desktop using the command in Ubuntu sudo apt-get install ./docker-desktop-<version>-<arch>.deb I’m getting bash: version: No such file or directory' error.

The log is –
sudo apt-get install ./docker-desktop-<version>-<arch>.deb

Hit:2 https://download.docker.com/linux/ubuntu jammy InRelease                 
Hit:3 http://in.archive.ubuntu.com/ubuntu jammy InRelease                      
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Fetched 324 kB in 2s (139 kB/s)     
Reading package lists... Done
bash: version: No such file or directory

But the Docker Engine has been configured successfully.

Running docker --version I am getting 
Docker version 20.10.14, build a224086

2

Answers


  1. You can use the apt:

    sudo apt-get update
    sudo apt-get install 
        ca-certificates 
        curl 
        gnupg 
        lsb-release
    
    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    
    echo 
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu 
      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
    

    Full instruction: here

    Login or Signup to reply.
  2. When you read the page at https://docs.docker.com/desktop/install/ubuntu/ and it says

    sudo apt-get install ./docker-desktop-<version>-<arch>.deb

    it actually means that you should insert the current values for the placeholders that are <version> and <arch>. This could be something like 20.10.16~3 and amd64, it will depend on what is in their repo at the time.

    The error you got from bash, namely bash: version: No such file or directory' error is a side-effect of the < and > having special meaning to bash so it saw a redirect. The error was local to your computer though.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search