- #DEB FILE INSTALLER APPLICATION HOW TO#
- #DEB FILE INSTALLER APPLICATION INSTALL#
- #DEB FILE INSTALLER APPLICATION ARCHIVE#
- #DEB FILE INSTALLER APPLICATION CODE#
Or remove it along with the configuration files (if any): sudo dpkg -P You can just remove the package: sudo dpkg -r Make sure it can be also uninstalled easily.
#DEB FILE INSTALLER APPLICATION INSTALL#
You can install it like any other regular deb package: sudo dpkg -i It's a good idea to test your deb package once created. Keep reading for additional goodies! Test your deb package If the operation is successful you have a deb package ready for distribution. deb file alongside the working directory or print an error if something is wrong or missing inside the package. Without such flag, all files and folders would be owned by your user, which might not exist in the system the deb package would be installed to. The -root-owner-group flag makes all deb package content owned by the root user, which is the standard way to go. So in our example: dpkg-deb -build -root-owner-group Invoke dpkg-deb as following: dpkg-deb -build -root-owner-group I will show you how in the next few paragraphs. You can fill it manually if you wish, but there are helper tools to ease the burden. The latter is extremely important in case your program relies on external libraries to work correctly. The control file may contain additional useful fields such as the section it belongs to or the dependency list. Mind the space at the beginning of this paragraph.
#DEB FILE INSTALLER APPLICATION CODE#
Mind the uppercase: a similar directory named debian (lowecase) is used to store source code for the so-called source packages. The control file lives inside the DEBIAN directory. Then copy the executable file in there: cp ~/YourProjects/Hello/hello hello_1.0-1_arm64/usr/local/bin The -p flag to the mkdir command will create nested directories. For example, suppose you want your program to be installed to /usr/local/bin: mkdir -p hello_1.0-1_arm64/usr/local/bin Put your program files where they should be installed to on the target system. Follow the same naming convention we have seen before. Create the working directoryĬreate a temporary working directory to make your package in.
Make sure you have the dpkg-deb program installed in your system: this will be used later on to generate the final archive. We are now ready to generate the package. Your deb file name would look something like hello_1.0-1_b.
A file put in one of those directories will be copied to the same location in the actual file system during installation. Internally, a deb package contains a collection of folders that mimics a typical Linux file system, such as /usr, /usr/bin, /opt and so on.
The most important one is the control file, which stores the information about the deb package and the program it installs.
#DEB FILE INSTALLER APPLICATION ARCHIVE#
Anatomy of a deb packageĪ deb is a standard Unix ar archive that contains your application and other utility files. Let's start off with a bit of theoretical background.
#DEB FILE INSTALLER APPLICATION HOW TO#
In this quick tutorial I want to show you how to generate a deb package from scratch that will install a binary executable in the target system. Deb files are handy when your app needs to take care of additional dependencies, integrate itself with the desktop, run pre and post install scripts and so on. deb extension, it is used to easily distribute and install programs for Linux Debian and derivatives. A deb file is an archive that contains data.