checkinstall is a command-line utility in Linux that is used to create and install software packages from source code. It is a wrapper around the make install command that is commonly used to install software from source, and it adds the ability to create a package file (such as a deb or rpm file) that can be easily uninstalled later.
To use checkinstall, you will need to have the necessary build dependencies and tools installed on your system, as well as the source code for the software you want to install.
To create and install a package using checkinstall, you can use the following command syntax:
# checkinstall [options] [make install options]
This command will run the make install command with the specified options, and then create a package file for the installed software. The package file will be stored in the current working directory and can be installed using the appropriate package manager (such as dpkg or rpm).
For example, to create and install a package for the foo software using checkinstall, you can use the following command:
# checkinstall --install=no make install
This command will run the make install command for the foo software, but will not actually install the software. Instead, it will create a package file that can be installed later using the appropriate package manager.
checkinstall Command Examples
1. Create and install a package with default settings:
# sudo checkinstall --default
2. Create a package but don’t install it:
# sudo checkinstall --install=no
3. Create a package without documentation:
# sudo checkinstall --nodoc
4. Create a package and set the name:
# sudo checkinstall --pkgname package
5. Create a package and specify where to save it:
# sudo checkinstall --pakdir path/to/directory