Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
74
rated 0 times [  74] [ 0]  / answers: 1 / hits: 161831  / 2 Years ago, wed, august 3, 2022, 2:37:44

Is there a way to install a deb package directly from a URL, using a shell?
Something like



dpkg -i http://domain.com/path/to/package.deb


(I know I could use wget and then dpkg, I'm just wondering if there's something that does it already)


More From » apt

 Answers
6

Edit: I didn't see your previous statement about knowing you could wget so this is a bit awkward... I'll leave this here for anybody who wants to know how to do this. Additionally the previous version of my answer didn't work but this version (at the expense of being somewhat longer) does:



TEMP_DEB="$(mktemp)" &&
wget -O "$TEMP_DEB" 'http://path.to/my.deb' &&
sudo dpkg -i "$TEMP_DEB"
rm -f "$TEMP_DEB"


You just need to alter the URL at the beginning. This could be aliased or written as a bash function.



I realise there are technical and security issues surrounding this (you don't get automatic updates, can the source be trusted, etc), but on a purely can-I-do-it basis, this might work.


[#44333] Wednesday, August 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oneeme

Total Points: 340
Total Questions: 110
Total Answers: 133

Location: Ghana
Member since Fri, Oct 21, 2022
2 Years ago
;