Malformed Input - Adding Docker Repo

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
rustyjarz
Level 1
Level 1
Posts: 4
Joined: Sat Aug 24, 2019 8:53 pm

Malformed Input - Adding Docker Repo

Post by rustyjarz »

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
User avatar
karlchen
Level 21
Level 21
Posts: 13367
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Malformed Input - Adding Docker Repo

Post by karlchen »

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:

Code: Select all

sudo add-apt-repository \
 "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Regards,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
rustyjarz
Level 1
Level 1
Posts: 4
Joined: Sat Aug 24, 2019 8:53 pm

Re: Malformed Input - Adding Docker Repo

Post by rustyjarz »

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:~$
rustyjarz
Level 1
Level 1
Posts: 4
Joined: Sat Aug 24, 2019 8:53 pm

Re: Malformed Input - Adding Docker Repo

Post by rustyjarz »

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.



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:

Code: Select all

sudo add-apt-repository \
 "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Regards,
Karl
User avatar
karlchen
Level 21
Level 21
Posts: 13367
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Malformed Input - Adding Docker Repo

Post by karlchen »

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)

Code: Select all

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
diydavid
Level 1
Level 1
Posts: 2
Joined: Thu Aug 29, 2019 2:43 pm

Re: Malformed Input - Adding Docker Repo

Post by diydavid »

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?
diydavid
Level 1
Level 1
Posts: 2
Joined: Thu Aug 29, 2019 2:43 pm

Re: Malformed Input - Adding Docker Repo

Post by diydavid »

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.
iheartpaddy
Level 1
Level 1
Posts: 3
Joined: Sat Sep 14, 2019 12:48 pm

Re: Malformed Input - Adding Docker Repo

Post by iheartpaddy »

This did the trick, thank you! I kept running into this and that solution for older Mint versions but this finally did the trick.
chanvaggelis
Level 1
Level 1
Posts: 1
Joined: Sat Nov 16, 2019 1:31 pm

Re: Malformed Input - Adding Docker Repo

Post by chanvaggelis »

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.
Thank you, it helped me, too.
Wennlys
Level 1
Level 1
Posts: 1
Joined: Fri Dec 27, 2019 9:32 am

Re: Malformed Input - Adding Docker Repo

Post by Wennlys »

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. = (
Na3than
Level 1
Level 1
Posts: 1
Joined: Sun Jan 26, 2020 10:12 pm

Re: Malformed Input - Adding Docker Repo

Post by Na3than »

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:

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"
(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:

Code: Select all

sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
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.
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Malformed Input - Adding Docker Repo

Post by gm10 »

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.
Actually this was fixed in LM 19.3 (although they broke something else while fixing that, fix for that is pending).

Shameless plug: It has always worked correctly for users of my PPA, which is available for all LM 19.x version.
32hamsters
Level 1
Level 1
Posts: 2
Joined: Wed May 13, 2020 4:52 pm

Re: Malformed Input - Adding Docker Repo

Post by 32hamsters »

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

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.
32hamsters
Level 1
Level 1
Posts: 2
Joined: Wed May 13, 2020 4:52 pm

Re: Malformed Input - Adding Docker Repo

Post by 32hamsters »

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.
Post Reply

Return to “Software & Applications”