[clug] Can dpkg install from a url?

Scott Ferguson scott.ferguson.clug at gmail.com
Thu Feb 28 19:36:03 MST 2013


On 01/03/13 11:10, Carlo Hamalainen wrote:
> Hi,
> 
> I just discovered that RPM can install from a url, e.g.
> 
> rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
> rpm -Uvh http://elrepo.org/elrepo-release-5-4.el5.elrepo.noarch.rpm
> 
> Can dpkg on Debian do the same? I suspect the answer is no, given that
> people here are writing wrapper scripts:
> 
> http://askubuntu.com/questions/51854/is-it-possible-to-install-a-deb-from-a-url
> 


Um, maybe a Ubuntu users forum isn't always the best indicator of what
Debian package management can do.

No need to re-invent the wheel, both wget and curl can download from a
url, and dpkg will install. eg:-
$ wget $url;su -c "dpkg -i $DownloadedPackage"

Note that's just pseudo commands.
You could script it properly as a one liner in .bash_aliases (%1 to get
$url and sed that for $DownloadedPackage) or a module in .bashrc.
I'd be *very* wary of installing packages from a url. Better to use a
signed, trusted repostitory - or check out the source and make a package
from that.

You could maybe also create a little script that did "su -c "dpkg -i %1"
and associate the script with the .deb extension in Iceweasel/whatever
browser...


More information about the linux mailing list