Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 12256  / 2 Years ago, wed, august 3, 2022, 8:16:07

add-apt-repository throws an error if I try to add a source repository:



This works:



sudo add-apt-repository 'deb http://dl.ajaxplorer.info/repos/apt squeeze main'


This fails with an error:



sudo add-apt-repository 'deb-src http://dl.ajaxplorer.info/repos/apt squeeze main'
Error: 'deb-src http://dl.ajaxplorer.info/repos/apt squeeze main' invalid


Leaving off the quotes doesn't help:



sudo add-apt-repository deb-src http://dl.ajaxplorer.info/repos/apt squeeze main
Error: need a repository as argument

More From » apt

 Answers
3

The man page for apt-add-repository says (emphasis added):




REPOSITORY can be either a line that can be added directly to sources.list(5), or ...



In the first form, REPOSITORY will just be appended to /etc/apt/sources.list.




Now, while deb-src is a legal type for sources.list and you may wish to file a bug, it appears that this will do the job just as well, since GPG keys are only downloaded for PPAs:



sudo sh -c "echo deb-src http://dl.ajaxplorer.info/repos/apt squeeze main  >> /etc/apt/sources.list"

[#37035] Thursday, August 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulpu

Total Points: 116
Total Questions: 118
Total Answers: 104

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
fulpu questions
Fri, Apr 1, 22, 08:36, 2 Years ago
Wed, Mar 16, 22, 15:25, 2 Years ago
Wed, Aug 24, 22, 22:59, 2 Years ago
Tue, Dec 20, 22, 22:33, 1 Year ago
;