0

Im getting this error "Configuration item specification must have an =" after apt install snapd. Apparently I have two versions available:

snapd/focal-updates,focal-security,now 2.54.3+20.04.1ubuntu0.2 amd64 [residual-config]
snapd/focal 2.44.3+20.04 amd64 [residual-config]

I'm a bit surprised there is nothing on Google for this error. I'm sure just need to enter a version with the =val, but not sure how yet.

2 Answers 2

0

As you've already identified, installing a specific version is generally done like this:

sudo apt install {package}={version}

So, to install snapd version 2.54.3, you would do this:

sudo apt install snapd=2.54.3

If you continue to receive errors, you may want to first deal with the [residual-config] messages that are part of your listing to ensure that some residual configuration files are not creating problems for the new installation.

1
  • it turns out it was related to an alias.. getting the exact same error after I tried adding multiple versions after = in multiple formats led me to suspect it wasnt related to the version.. the residual-config has to do with that Im trying to move /snap dir to a partition.
    – alchemy
    Mar 22, 2022 at 5:35
0

From man apt, "install pkg [{=pkg_version_number.." and "A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select."

I'm assuming no space, but I still get the same error with putting apt install snapd=anything. I'm going to try to remove the plain focal repo from sources.list, but that isnt a good solution.

I commented out the main focal repo line. I am using UbuntuAdvantage cips which has extra source lists in the source.list.d dir. Removing just the main focal repo, makes apt list only one version. However, I still get the same error.

Okay, that is strange. I had a hunch it could be from my apt alias (which is alias apt='sudo apt ' so I don't have to type sudo every time) and sure enough it succeeded. I don't know why.

Putting \ before any alias will unalias it.

5
  • Having a space at the end of an alias like in alias apt='sudo apt ' means that the next work is considered for alias expansion too (so the install in apt install .. is also expanded as an alias. Have you also made an alias for install? Use set -x; apt install ...; set +x to see what bash runs exactly.
    – muru
    Mar 22, 2022 at 5:13
  • @muru, thanks.. yes, the space is on purpose. I just found I added one for install because it allows mv'ing into a dir while keeping the target ownership and perms, and it has the commands necessary for that in the alias. I'll have to make a different name for it.. thanks that was a very intuitive insight! (maybe I'll alias mv to install, cant see why not).. btw, running alias shows them all.. and the space is so I can use aliases to common directories.. I can type vi fstab and it will run vi /etc/fstab I also have one for cat sources will then be cat /etc/apt/sources.list
    – alchemy
    Mar 22, 2022 at 5:23
  • Then I'd suggest removing the space in the apt alias, since there are only a limited set of subcommands for apt, and you're unlikely to pass in directories as the first argument to apt.
    – muru
    Mar 22, 2022 at 5:29
  • @muru thanks, i considered being more selective about the spaces.. i added them to about 50 aliases in bulk.. i think my mistake was being so excited there was a builtin command for moving files without changing ownership, like to root.. as I am often "sudo -s'd" into. I wonder if there are permissions for directories that forbid allowing different ownership inside. Still mv should do this by default, or at least have a flag for it I could alias, in my opinion. So many Ubuntu users, only have one user and have to use root to manipulate so many things as root.
    – alchemy
    Mar 22, 2022 at 5:46
  • another idea would be to have an option to show the unaliased command before it runs.. which someone has posted here: askubuntu.com/questions/1139470/….. or showing the full expanded command in the history.. I might have to add type <alias>; .. to all of them.. or it looks like there might be a shopt setting.
    – alchemy
    Mar 22, 2022 at 5:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .