1

I have a problem. I have a .deb file for my ubuntu app, but I want users to be able to install it using the sudo apt-get install command. How would I make it so that anyone can install my .deb file with sudo apt-get install?

JSGuy
  • 13
  • 3
  • What directories does your .deb file install to, most .deb files install to locations that require `sudo` or elevated privileges. You can package programs to install to $HOME or the user directory that won't require `sudo`, but there will be limitations to this (available only to user who installed it, depending on your UI in use, it may not be seen by all menu systems etc; many of which can be worked around - but the work arounds will be DE more dependent than system directories). – guiverc Jan 14 '21 at 23:39
  • https://askubuntu.com/questions/16446/how-to-get-my-software-into-ubuntu – KGIII Jan 14 '21 at 23:40
  • @schrodigerscatcuriosity Is there a benefit or difference in using dpkg over apt – JSGuy Jan 14 '21 at 23:50

2 Answers2

3

You could read about 'personal package archives' (PPA). That's one method to share a debian packaged program with many other users. To install it then they need to do nothing but this:

sudo add-apt-repository ppa:YOUR-LAUNCHPAD-USERNAME/PPA-NAME 
sudo apt-get update
sudo apt-get install SOFTWARE-NAME

Those PPAs are hosted on Launchpad so there website might be a good place to start at.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
Tayfe
  • 156
  • 1
  • 1
  • 8
1
sudo apt install /path/to/file.deb

or, if you are already in the correct directory,

sudo apt install ./file.deb
user535733
  • 58,040
  • 10
  • 106
  • 136
  • [Odd](https://askubuntu.com/q/40779/349837) I always get _Note, selecting 'on_repo_pkg' instead of './pkg.deb'_. This was added [to `apt` v 1.1](https://salsa.debian.org/apt-team/apt/blob/e02297b8e22dae04872fe6fab6dba966de65dbba/debian/changelog#L2410) – Pablo Bianchi Jan 15 '21 at 07:30
  • @PabloBianchi edited. Thanks for catching that mistake. – user535733 Jan 15 '21 at 16:44