Linux: Compiling and Installing Source Code from the Terminal
Jump to navigation
Jump to search
Method 1, generic
- Install the needed dev packages
- For Debian based package management
sudo apt-get install automake autoconf
- For openSUSE
sudo zypper install gcc make
- For Debian based package management
- Acquire the source code, and untar it if need be. See Linux: Acquiring Source Code
- Ensure the root directory and its subdirectories and files have the access permissions set correctly. i.e. not read-only.
- Enter the command below from the sources root directory, breaking up the three individual commands if needed.
sudo ./configure && make && make install
Method 2, Debian based
- Install the base compiler toolchain
sudo apt-get install build-essential devscripts
- Acquire the source code, and untar it if need be. See Linux: Acquiring Source Code
- Install the build time dependencies
sudo apt-get build-dep whateverPackage
- compile the package
sudo debuild -us -uc
- go up one directory
cd ..
- install the compiled .deb package
sudo dpkg -i filename.deb