How to install tar gz on arch linux

Installing packages from source in Arch Linux

In our previous article, we looked at how you can install packages in Arch Linux using ‘AUR helpers’ like Yaourt and Packer. Today, We’ll delve into installing packages from source in Arch Linux.

Why should you install packages from source?

Installing from source is quite tedious and takes up a lot of time. This is why most people prefer installing packages using pre-built packages to compiling from source. So begs the question, why should one still insist on compiling software from code?
Installing a software from source basically implies installing a software without the use of a package manager like APT for Debian or Yum for RedHat distributions. It involves compiling software from source code and saving binary packages to your system. Usually, users download programs’ source code from version control / hosting services like GitHub.

Binary packages come already built from source by the developer with features & parameters already pre-defined and provided so that users can install them.

Benefits of installing packages from source in Arch Linux

To install a software from source, you need to first build the source code manually, by yourself. This implies that you need to handle the dependencies manually and be aware of all the features of the package so that you can be in a position to build it accordingly.

Below are some of the advantages of installing software from source

  1. Installing from source allows you to install the latest versions of packages which can always be kept updated, be it a security patch or a new feature.
  2. It grants you the ability to choose the features you require during installation to suit your needs.
  3. In addition, you can add some features which may not be provided in the binary packages.
  4. You can install packages in any preferred location

Installing Packages from source in ArchLinux

To install a third-party software package in Arch Linux access the AUR package repository page and search for the package you need to install. In our case, We are going to install Google Chrome in our Arch Linux system.

Installing packages from source in Arch Linux

Click on “Download Snapshot” in the right pane under “Package Actions“. This will download the tarball of Google Chrome in your local ‘Downloads’ folder.

Navigate to the ‘Downloads’ folder and extract the tarball

tar -xvf google-chrome.tar.gz
google-chrome/ google-chrome/.SRCINFO google-chrome/PKGBUILD google-chrome/eula_text.html google-chrome/google-chrome-stable.sh google-chrome/google-chrome.install

Navigate the newly created google-chrome folder with the cd command

To view the directory’s contents, use the ls command. Be sure to catch a glance of several files

Next, run the makepkg command

Sample output

==> Making package: google-chrome 68.0.3440.106-1 (Sun Aug 26 20:28:49 2018) ==> Checking runtime dependencies. ==> Checking buildtime dependencies. ==> Retrieving sources. -> Downloading google-chrome-stable_68.0.3440.106_amd64.deb. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 51.5M 100 51.5M 0 0 286k 0 0:03:04 0:03:04 --:--:-- 146k -> Found eula_text.html -> Found google-chrome-stable.sh ==> Validating source files with md5sums. google-chrome-stable_68.0.3440.106_amd64.deb . Passed eula_text.html . Passed google-chrome-stable.sh . Passed ==> Extracting sources. -> Extracting google-chrome-stable_68.0.3440.106_amd64.deb with bsdtar ==> Entering fakeroot environment. ==> Starting package(). -> Extracting the data.tar.xz. -> Moving stuff in place. -> Fixing Chrome icon resolution. -> Removing Debian Cron job and duplicate product logos. ==> Tidying install. -> Removing empty directories. -> Removing libtool files. -> Purging unwanted files. -> Removing static library files. -> Compressing man and info pages. ==> Checking for packaging issues. ==> Creating package "google-chrome".

The makepkg tool automates the process of converting the source code into binaries by acting as a compiler. In this case, the makepkg command instructs the System to generate a native Arch Linux package for Google Chrome.

Читайте также:  Bodhi linux 32 bit iso

Inside the snapshot folder, you’ll discover a newly generated native arch package for Google Chrome.

google-chrome-68.0.3440.106-1-x86_64.pkg.tar.xz

Switch to root user and run the command below to install Google Chrome

pacman -U google-chrome*.tar.gz

Sample Output

loading packages. resolving dependencies. looking for conflicting packages. Packages (1) google-chrome-68.0.3440.106-1 Total Installed Size: 185.48 MiB :: Proceed with installation? [Y/n] Y (1/1) checking keys in keyring [######################] 100% (1/1) checking package integrity [######################] 100% (1/1) loading package files [######################] 100% (1/1) checking for file conflicts [######################] 100% (1/1) checking available disk space [######################] 100% :: Processing package changes. (1/1) installing google-chrome [######################] 100%

Final thoughts

Installing software from source is usually avoided by most users because of its long and tedious process, but once you get the hang of it, you’ll reap immensely from getting the latest software packages and to choosing what you want during the installation process. In this article, we have taken you through how you can manually install software packages from source in ArchLinux.Thank you for your time and feel free to try out the commands.

About James

Hey there! This is James, a Linux administrator and a tech enthusiast. I love experimenting with various distributions of Linux and keeping tabs on what’s new in the Linux world.

  • Install packages in Arch Linux from AUR 23769 22
  • 11 Ways to free up disk space on cPanel servers 20248 12
  • Installing packages from source in Arch Linux 19376 11
  • How to restrict SSH access only to specific IPs 19371 26
  • How to configure a static IP on Linux 19316 10
  • HOW TO INSTALL GNOME SHELL EXTENSIONS IN LINUX 18257 6
  • How to install Moodle on Ubuntu 18.04 17576 17
  • How to Install a Desktop and VNC on Ubuntu 16.04 17076 16
  • How to install NextCloud on Debian 10 16939 9
  • How to install Yay helper on ArchLinux 16057 15
  • How to fix the repository is not signed error on Ubuntu 20.04 16005 11
  • How to install Zimbra Mail server 8.8.8 on Cent OS 7 15438 6
  • How to install GUI on Ubuntu server 18.04 15362 4
  • How to create a user on Ubuntu 20.04 15338 8
  • How to Install GitLab on CentOS 7, RHEL and Scientific Linux 15163 6
  • Check which folders use the highest disk space in linux 14446 18
  • How to test network throughput using iperf3 tool 14327 11
  • How to change default Nginx port in Linux 14198 5
  • Installation of cPanel on your Centos 7 server 14020 6
  • How To Fix Sudo Command Not Found In Debian 10 12652 6
Читайте также:  Virtualbox общая папка linux debian

CloudCone, LLC

An unmatched stack of cloud services that collaborate to provide a scalable infrastructure for your online presence, fully managed by friendly humans.

Источник

How to install tar.gz file on Linux

The .tar.gz file format is a tar archive that has been compressed with gunzip compression. These archives are designed to be opened on Linux systems and can contain any type of files within them. Sometimes, software comes packaged in a .tar.gz file, and users can extract its contents in order to install what is inside.

Normally, software comes in the form of a compressed archive whenever it is to be compiled from source. Whereas distributable binaries are normally installed through other means, such as via the system’s package manager. In this tutorial, we will go over the step by step instructions to install software from a .tar.gz file on a Linux system.

In this tutorial you will learn:

  • How to extract content from a compressed tar file
  • How to install prerequisite packages to build from source
  • How to configure, make, and install source files

How to install tar.gz file on Linux

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software tar, gzip, development tools
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Install prerequisites

To install software from a compressed archive, we will need the proper tools to extract the files and to compile the source code. We can use our system’s package manager to install these tools by executing the appropriate command below.

To install tar extraction and compiling tools on Ubuntu, Debian, and Linux Mint:

$ sudo apt update $ sudo apt install tar gzip build-essential

To install tar extraction and compiling tools on Fedora, CentOS, AlmaLinux, and Red Hat:

$ sudo dnf groups mark install "Development Tools" $ sudo dnf groupinstall "Development Tools" $ sudo dnf install tar gzip

To install tar extraction and compiling tools on Arch Linux and Manjaro:

$ sudo pacman -Sy base-devel tar gzip

Install software from .tar.gz

WARNING
The recommended way to install software from source is to check the README file or official website for instructions. They may tell you to execute certain commands or include particular options, and may also reveal other prerequisite packages that are needed for installation in addition to the ones we showed you above.

With the disclaimer above out of the way, keep in mind that different packages may require a different set of instructions for installation. We will run through the most general steps that the majority of software packages follow for installation:

Читайте также:  Неклассифицированное usb устройство astra linux

    Start by extracting the contents of your archive.

Closing Thoughts

In this tutorial, we saw how to install software from a .tar.gz archive on a Linux system. Software source files are normally distributed this way, and require the user to build and compile the code before finally installing it on the system. Various software will require a unique set of instructions, but in general, most software installation will follow the steps shown above, and sometimes with slight differences that may or may not have an impact on the final result. Definitely make sure you consult the readme file or official instructions for the exact process.

Comments and Discussions

Источник

Установка скачанных пакетов *.tar.gz

Не судите строго (как говорится. ), помогите разобраться. Никак не получается установить пакеты, скачанные, которые имеют разширение *.tar.gz
Пробую через pacman командами
1. pacman -U *.tar.gz
ответ:
загрузка пакетов.
ошибка: отсутствуют метаданные пакета в *.tar.gz
ошибка: ‘*.tar.gz’: неверный или поврежденный пакет

2. Через ‘abs’
# abs
pacman -U abs-*.tar.gz
загрузка пакетов.
ошибка: ‘abs-*.tar.gz’: не удалось найти или прочитать
пакет
Вроде все делаю как в инструкции написано, но ничего не получается. ((

lampslave
А кто сказал, что это пакеты? Это архивы с исходниками. Чтобы их установить, надо сначала собрать пакет.
Вы чего поставить-то хотите?

ок. тогда скажите, где брать оставшееся. ((

например хотел установить FreeCAD

Но лучше всё-таки установите yaourt, чтобы не заниматься всем этим вручную.

[[email protected] aquarium]# yaourt freecad 1 aur/freecad 0.13.1830-2 (132) A general purpose 3D CAD modeler 2 aur/freecad-git 20130308-1 (47) A general purpose 3D CAD modeler ==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3) ==> ------------------------------------------------------- ==> 1-3 ==> Downloading freecad PKGBUILD from AUR. x PKGBUILD x freecad.desktop x freecad.xml x freecad.install Comment by ImNtReal (2013-03-01 23:59) @Hibernate,ok. Adding a 4 to the end worked for me. Comment by mickele (2013-03-02 20:17) Updated to qt4 Comment by gyurman (2013-03-29 19:00) Hello, pyCollada is missing from package. $ sudo pacman-color -S --asdeps --needed python-lxml python-numpy python-dateutil python2-distribute $ git clone git://github.com/pycollada/pycollada.git pycollada $ sudo easy_install-2.7 pycollada $ import collada $ freecad I did this, and working well. Comment by Tae (2013-04-03 23:46) $ freecad freecad: error while loading shared libraries: libboost_signals.so.1.52.0: cannot open shared object file: No such file or directory I have boost-libs installed, and I tried installing boost, but I have the same error. I don't know when I broke it :S Comment by russo79 (2013-04-04 00:34) @Tae Boost was recently updated in the official repositories. You need to rebuild freecad so that it uses the new version of the libraries. freecad 0.13.1830-2 (Пт ноя 17 15:59:38 MSK 2006) ( Unsupported package: Potentially dangerous ! ) ==> Edit PKGBUILD ? [Y/n] ("A" to abort) ==> ------------------------------------ ==> n /usr/lib/yaourt/pkgbuild.sh: /usr/bin/makepkg: /usr/bin/bash: плохой интерпретатор: Нет такого файла или каталога Unable to read PKGBUILD

© 2006-2023, Русскоязычное сообщество Arch Linux.
Название и логотип Arch Linux ™ являются признанными торговыми марками.
Linux ® — зарегистрированная торговая марка Linus Torvalds и LMI.

Источник

Оцените статью
Adblock
detector