To install software from a .tar.gz
file, follow these general steps:
-
Download and extract the
.tar.gz
file:tar -xvzf filename.tar.gz
This command extracts the contents into a directory named after the file.
-
Navigate to the extracted directory:
cd filename
-
Read any provided documentation (usually a
README
orINSTALL
file) for specific instructions. Some packages may require extra steps. -
Configure the package (if needed): Many
.tar.gz
files use a configuration script to prepare for installation. Run:./configure
This checks dependencies and prepares the environment. If dependencies are missing, install them as indicated.
-
Compile the package: If the package contains source code, you may need to compile it:
make
-
Install the package:
sudo make install
This installs the software system-wide. You may need
sudo
to give permission. -
Clean up (optional): To remove build files, run:
make clean
Notes:
- Dependencies: Some packages require additional libraries or dependencies, which the
configure
script usually identifies. - Binary files: If the
.tar.gz
file contains binary files instead of source code, the process might skip themake
step and may only require moving the files to an appropriate location, like/usr/local/bin
.