Unable to locate package. Have I done something wrong?

5,435

Remove the \ from your command:

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

I guess you copied the command from some web page where it was split over several lines. In that case the \ prevents the line ends from marking the end of the command.

If you use just one line for the command the \ tell apt-get that you want to install packages called "" (one space) which causes the errors.

Share:
5,435

Related videos on Youtube

Bax Mendoza
Author by

Bax Mendoza

Updated on September 18, 2022

Comments

  • Bax Mendoza
    Bax Mendoza over 1 year

    I am installing docker in Ubuntu WSL on Windows 10 and I am using this command

    sudo apt-get install -y \     apt-transport-https \     ca-certificates \     curl \     software-properties-common
    

    However, the output is this:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package
    E: Unable to locate package
    E: Unable to locate package
    E: Unable to locate package
    

    Do I have an error or is this normal?