How to install wildcard architecture packages on Ubuntu. Trying to add gives dpkg: error: architecture 'any', "all" is reserved and cannot be added

ph flag

I expect to install packages created for different architecture onto my ubuntu server - and since those packages being architecture agnostic - they use a wild card

I want to add the wild-card such as "any" or "all" as a foreign architecture

I referred to Since

But When I try to run command

enter code here
dpkg --add-architecture all
dpkg: error: architecture 'all' is reserved and 
cannot be added
dpkg: error: architecture 'any' is reserved and 
cannot be addeddpkg: error: architecture 'any' is 
reserved and cannot be added

Based on below comment by @guiverc I referred to

As suggested in that I made an entry in /etc/dpkg/dpkg.cfg.d/multiarch as follows.. but after that when I run "pkg --print-foreign-architectures" gives an error "nknown option 'foreign-architecture'"

# cat /etc/dpkg/dpkg.cfg.d/multiarch
  foreign-architecture all

dpkg --print-foreign-architectures        dpkg: 
error: configuration error: 
/etc/dpkg/dpkg.cfg.d/multiarch:1: unknown 
option 'foreign-architecture'

apt update


Any suggestions ?

guiverc avatar
cn flag
Did you read ?? Multiarch is not enabled on Ubuntu by default for the reason specified ; you used the Debian notes as you're using Debian?? or Ubuntu Server you mention?? Why not look up Ubuntu docs?
Yogesh Devi avatar
ph flag
Hello guiverc . Thanks - after your directed me I read teh wiki and as per that I made an entry in /etc/dpkg/dpkg.cfg.d/multiarch .. as directed but that gives an error - I am including that in edited question
ph flag

Since I did not find a direct answer to my question

Intially I though I needed to do something for "adding" the architecture "all" .so I install install time I added a suffix :all to package name and was happy that it installs well

apt install <my packagename>:all

And even more interesting - when using "all" wildcards - it is NOT necessary to specify the architecture suffix - so

apt install <my packagename> 

works just fine as far as you have a repository defined and have the packages with architecture="all" present


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.