Malformed Input - Adding Docker Repo
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Malformed Input - Adding Docker Repo
Hi all,
Trying to install and setup GNS3 in Mint Tina.
Adding the Docker Repo I'm getting the below error and I have no idea why. I'm following the Docker Web Guide, https://docs.docker.com/install/linux/docker-ce/ubuntu/.
computer:~$ sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
Malformed input, repository not added.
Thanks in advance
Trying to install and setup GNS3 in Mint Tina.
Adding the Docker Repo I'm getting the below error and I have no idea why. I'm following the Docker Web Guide, https://docs.docker.com/install/linux/docker-ce/ubuntu/.
computer:~$ sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
Malformed input, repository not added.
Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Malformed Input - Adding Docker Repo
Hello, rustyjarz.
Therefore try the given command in a slightly corrected way:
Regards,
Karl
lsb_release -cs
returns "bionic" on genuine Ubuntu 18.04, which would be the correct and needed nickname.lsb_release -cs
returns "tina" on Linux Mint 19.2; but we need "bionic" (see above).Therefore try the given command in a slightly corrected way:
Code: Select all
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Karl

The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for more than 500 days now.
Die perfekte Diktatur
Re: Malformed Input - Adding Docker Repo
Thanks Karl
Actually running that command returns the below. I tried changing the release to disco as that's the equivalent to tina, but still didn't work.
me:~$ lsb_release -cs
tina
rme:~$
Actually running that command returns the below. I tried changing the release to disco as that's the equivalent to tina, but still didn't work.
me:~$ lsb_release -cs
tina
rme:~$
Re: Malformed Input - Adding Docker Repo
Yes Karl you're right, I was reading somewhere else and found this command, inxi -Fxzr which gave me
System: Host: MSI Kernel: 4.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: MATE 1.22.0
Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic
But the command still didn't work,
:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu Bionic stable"
[sudo] password for :
Malformed input, repository not added.
System: Host: MSI Kernel: 4.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: MATE 1.22.0
Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic
But the command still didn't work,
:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu Bionic stable"
[sudo] password for :
Malformed input, repository not added.
karlchen wrote: ⤴Sat Aug 24, 2019 9:04 pm Hello, rustyjarz.
lsb_release -cs
returns "bionic" on genuine Ubuntu 18.04, which would be the correct and needed nickname.
lsb_release -cs
returns "tina" on Linux Mint 19.2; but we need "bionic" (see above).
Therefore try the given command in a slightly corrected way:Regards,Code: Select all
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Karl
Re: Malformed Input - Adding Docker Repo
I am not sure whether it will make the difference; but Linux is case-sensitive, therefore bionic and Bionic are 2 different names for Linux.
As a consequence you might try the commandline precisely as I had given it, i.e. with bionic (all lowercase letters)
As a consequence you might try the commandline precisely as I had given it, i.e. with bionic (all lowercase letters)
Code: Select all
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for more than 500 days now.
Die perfekte Diktatur
Re: Malformed Input - Adding Docker Repo
Hi, I am having the same issue as Rusty.
I get a Malformed Input error when trying to add the Docker repo. I am on Linux Mint 19.2 Tina
Comand:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
I am a complete newbie, does anyone have any suggestions?
I get a Malformed Input error when trying to add the Docker repo. I am on Linux Mint 19.2 Tina
Comand:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
I am a complete newbie, does anyone have any suggestions?
Re: Malformed Input - Adding Docker Repo
For others that may be having this problem when installing Docker on Linux Mint 19.2, I managed to resolve this issue by adding a line to the additional-repositories.list file.
Here are the steps I used. Use all commands without quotes.
1. Open the "additional-repositories.list" file.
In the terminal window enter, "sudo nano /etc/apt/sources.list.d/addtional-repositories.list"
2. Enter password
3. Add the line, "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" without quotes.
4. Save and exit, using the keyboard enter "ctrl + o", and enter to save the file. Then "ctrl + x" to exit nano.
5. Now update the index, "sudo apt-get update".
And verify that "...download.docker.com/ubuntu bionic..." is updated.
Here are the steps I used. Use all commands without quotes.
1. Open the "additional-repositories.list" file.
In the terminal window enter, "sudo nano /etc/apt/sources.list.d/addtional-repositories.list"
2. Enter password
3. Add the line, "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" without quotes.
4. Save and exit, using the keyboard enter "ctrl + o", and enter to save the file. Then "ctrl + x" to exit nano.
5. Now update the index, "sudo apt-get update".
And verify that "...download.docker.com/ubuntu bionic..." is updated.
-
- Level 1
- Posts: 3
- Joined: Sat Sep 14, 2019 12:48 pm
Re: Malformed Input - Adding Docker Repo
This did the trick, thank you! I kept running into this and that solution for older Mint versions but this finally did the trick.
Re: Malformed Input - Adding Docker Repo
Thank you, it helped me, too.diydavid wrote: ⤴Fri Aug 30, 2019 4:31 pm For others that may be having this problem when installing Docker on Linux Mint 19.2, I managed to resolve this issue by adding a line to the additional-repositories.list file.
Here are the steps I used. Use all commands without quotes.
1. Open the "additional-repositories.list" file.
In the terminal window enter, "sudo nano /etc/apt/sources.list.d/addtional-repositories.list"
2. Enter password
3. Add the line, "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" without quotes.
4. Save and exit, using the keyboard enter "ctrl + o", and enter to save the file. Then "ctrl + x" to exit nano.
5. Now update the index, "sudo apt-get update".
And verify that "...download.docker.com/ubuntu bionic..." is updated.
Re: Malformed Input - Adding Docker Repo
Okay, but how do I use the command right now? Because the old one
"$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
it's still not working. = (
"$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
it's still not working. = (
Re: Malformed Input - Adding Docker Repo
The command provided in the Get Docker Engine - Community for Ubuntu instructions throws a "Malformed input" error on current versions of Linux Mint because the Linux Mint variants of the scripts that update apt repositories (software sources) don't currently support Debian options like "[arch=amd64]". This will be fixed in a future version of Linux Mint. For now, if you know what you're doing you can replace your /usr/lib/linuxmint/mintSources/mintSources.py script with this one or just edit the /usr/lib/linuxmint/mintSources/mintSources.py script directly to apply this change which enables support for deb options.
If you're unwilling to or don't know how to edit/change mintSources.py, as a quick fix you can just omit the "[arch=amd64]" portion of the command:
Any of those workarounds will allow you to get past the "Malformed input" error and add the Docker repository to your sources list, but when you try to follow the next steps in the Get Docker instructions using Linux Mint you'll get a new error:
... because the "$(lsb_release -cs)" portion of the add-apt-repository command above returns the Linux Mint release name (e.g. "tara", "tessa", "tina", "tricia") rather than the Ubuntu release name ("bionic"), and the Docker repository at download.docker.com/linux/ubuntu doesn’t recognize Linux Mint release names. To address that problem, first remove the Docker repository you just added from your Linux Mint sources list (the easiest way to do this is from the Software Sources utility, but you can also remove it by inserting " -r" after add-apt-repository in the add-apt-repository command you just ran), then use this slightly different version of the add-apt-repository command to get the Ubuntu release name instead of the Linux Mint release name:
(Credit for this last part of the solution goes to Josphat Mutai at Computingforgeeks.com)
If you skipped the mintSources.py changes I described above and you're still getting "Malformed input" error from add-apt-repository, omit the "[arch=amd64]" portion of the command:
If all of this is too much to handle, the method described by diydavid (directly editing /etc/apt/sources.list.d/addtional-repositories.list) should work on all Linux Mint 19.x.
If you're unwilling to or don't know how to edit/change mintSources.py, as a quick fix you can just omit the "[arch=amd64]" portion of the command:
Code: Select all
sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Any of those workarounds will allow you to get past the "Malformed input" error and add the Docker repository to your sources list, but when you try to follow the next steps in the Get Docker instructions using Linux Mint you'll get a new error:
E: The repository 'https://download.docker.com/linux/ubuntu [...]' does not have a Release file.
... because the "$(lsb_release -cs)" portion of the add-apt-repository command above returns the Linux Mint release name (e.g. "tara", "tessa", "tina", "tricia") rather than the Ubuntu release name ("bionic"), and the Docker repository at download.docker.com/linux/ubuntu doesn’t recognize Linux Mint release names. To address that problem, first remove the Docker repository you just added from your Linux Mint sources list (the easiest way to do this is from the Software Sources utility, but you can also remove it by inserting " -r" after add-apt-repository in the add-apt-repository command you just ran), then use this slightly different version of the add-apt-repository command to get the Ubuntu release name instead of the Linux Mint release name:
Code: Select all
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
If you skipped the mintSources.py changes I described above and you're still getting "Malformed input" error from add-apt-repository, omit the "[arch=amd64]" portion of the command:
Code: Select all
sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
Re: Malformed Input - Adding Docker Repo
Actually this was fixed in LM 19.3 (although they broke something else while fixing that, fix for that is pending).Na3than wrote: ⤴Mon Jan 27, 2020 1:17 am The command provided in the Get Docker Engine - Community for Ubuntu instructions throws a "Malformed input" error on current versions of Linux Mint because the Linux Mint variants of the scripts that update apt repositories (software sources) don't currently support Debian options like "[arch=amd64]". This will be fixed in a future version of Linux Mint.
Shameless plug: It has always worked correctly for users of my PPA, which is available for all LM 19.x version.
Re: Malformed Input - Adding Docker Repo
The instructions on the docker website (https://docs.docker.com/engine/install/ubuntu/) contain double quotes which seem to break add-apt-repository.
The following command worked on Mint 19.2 Tina
Well, it worked (as in no error messages came back) but (below) the repo wasn't found by apt-update.
The following command worked on Mint 19.2 Tina
sudo add-apt-repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
Well, it worked (as in no error messages came back) but (below) the repo wasn't found by apt-update.
Last edited by 32hamsters on Wed May 13, 2020 5:29 pm, edited 1 time in total.
Re: Malformed Input - Adding Docker Repo
Update - even after
sudo add-apt-repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
apt-update didn't find the docker binaries.
I had to append this to /etc/apt/sources.list (note http, not https)
deb [arch=amd64] http://download.docker.com/linux/ubuntu bionic stable
and then (finally!) docker installed.
sudo add-apt-repository deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
apt-update didn't find the docker binaries.
I had to append this to /etc/apt/sources.list (note http, not https)
deb [arch=amd64] http://download.docker.com/linux/ubuntu bionic stable
and then (finally!) docker installed.