How to: Recompiling / Rebuild Debian / Ubuntu Linux Binary Source File Packages

www.la‮ruttu‬i.com
How to: Recompiling / Rebuild Debian / Ubuntu Linux Binary Source File Packages

To recompile or rebuild a Debian or Ubuntu Linux binary source file package, you will need to use the dpkg-buildpackage command. dpkg-buildpackage is a command-line utility that is used to build a Debian package from a source package.

Here's a general outline of the steps you will need to follow to recompile or rebuild a binary source file package using dpkg-buildpackage:

  1. Install the necessary build dependencies for the package. This may involve installing packages such as build-essential, debhelper, and other build tools. You can use the apt-get build-dep command to automatically install the required build dependencies for the package.

  2. Download the source package for the package you want to rebuild. You can do this using the apt-get source command.

  3. Extract the source package and change to the directory containing the package's source files.

  4. Run the dpkg-buildpackage command to build the package.

Here's an example of how to use dpkg-buildpackage to rebuild a package called mypackage:

apt-get build-dep mypackage
apt-get source mypackage
cd mypackage-*
dpkg-buildpackage
  1. Once the package has been built, you can use the dpkg command to install the newly built package.

Here's an example of how to install the newly built package using dpkg:

sudo dpkg -i ../mypackage_*.deb

It's important to note that rebuilding a package may be necessary if you have made changes to the package's source code or if you need to apply patches or updates to the package. Consult the dpkg-buildpackage documentation and online resources for more information on how to recompile or rebuild a Debian or Ubuntu Linux binary source file package.

Created Time:2017-10-29 22:08:42  Author:lautturi