Как установить pkg в linux

How To Install pkg-config on Ubuntu 22.04

In this tutorial we learn how to install pkg-config on Ubuntu 22.04.

What is pkg-config

pkg-config is a system for managing library compile and link flags that works with automake and autoconf.

Increasingly libraries ship with “.pc” files that allow querying of the compiler and linker flags needed to use them through the pkg-config(1) program.

There are three ways to install pkg-config on Ubuntu 22.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install pkg-config Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install pkg-config using apt-get by running the following command:

sudo apt-get -y install pkg-config 

Install pkg-config Using apt

Update apt database with apt using the following command.

After updating apt database, We can install pkg-config using apt by running the following command:

sudo apt -y install pkg-config 

Install pkg-config Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

After updating apt database, We can install pkg-config using aptitude by running the following command:

sudo aptitude -y install pkg-config 

How To Uninstall pkg-config on Ubuntu 22.04

To uninstall only the pkg-config package we can use the following command:

sudo apt-get remove pkg-config 

Uninstall pkg-config And Its Dependencies

To uninstall pkg-config and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove pkg-config 

Remove pkg-config Configurations and Data

To remove pkg-config configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge pkg-config 

Remove pkg-config configuration, data, and all of its dependencies

We can use the following command to remove pkg-config configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge pkg-config 

References

Summary

In this tutorial we learn how to install pkg-config package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.

Читайте также:  Linux update date time

Источник

Как установить pkg в linux

Метод создания chroot-окружения подходит для создания окружения с любым дистрибутивом, использующим репозиторий основанный на .rpm пакетах.

¶ DEB пакеты

Метод создания chroot-окружения подходит для создания окружения с любым дистрибутивом, использующим репозиторий основанный на .deb пакетах.

¶ Установка .apk пакетов

¶ Установка .pkg.tar.zst, .tgz, .tbz, .tbz2, .pkg.gz пакетов

Для установки .tgz, .tbz, .tbz2, .pkg.gz необходимо имеющийся пакет разархивировать с помощью утилиты tar:

#Для архивов сжатых с помощью GZIP (.gz, .gz2 и т.д.): tar -xvzf имя_файла #Для архивов сжатых с помощью BZIP (.bz, .bz2 и т.д.): tar -xvjf имя_файла #Для архивов сжатых с помощью XZ (.tar.xz, .txz): tar -xvJf имя_файла 
  • x — извлечь файлы из архива;
  • v — подробный вывод информации на экран;
  • f — Обязательная опция. Если не указать, Tar будет пытаться использовать магнитную ленту вместо файла;
  • z — обработать архив сжатый gzip’ом;
  • j — обработать архив сжатый bzip’ом.

После выполнения команды, будет создан каталог с именем, идентичным названию пакета .

Переход в созданный каталог:

Далее, все зависит от того, как была собрана программа: в виде исполняемого файла , или в исходном коде .

Перед установкой прочитать инструкцию (README), которая присутствует в каждом архиве.

Если программа собрана в виде исполняемого файла , в папке будет находиться файл, с расширением .sh или же с названием необходимой программы (например, firefox). Его достаточно просто запустить на исполнение:

Если же программа представлена в исходном коде , выполнить следующие команды:

./configure # Поиск необходимых для компиляции библиотек и заголовочных файлов make # компиляция программы sudo make install # установка программы 

После установки выполнить очистку каталога от всех файлов полученных в результате компиляции:

Читайте также:  Linux network mac address

¶ Пример установки

Для примера приведена установка GParted.

Клонируем актуальную версию GParted с GitHub:

git clone https://github.com/GNOME/gparted.git 

В файле README указаны необходимые зависимости для устанавливаемой программы, если они отсутствуют в системе, то их необходимо установить.

Далее следует запустить формирование установочного файла:

Затем необходимо запустить:

Программа GParted установлена.

Источник

Уравление пакетами в Linux

Обычно программы инсталлируются через интернет, предварительно скачивая их с репозиториев. Скачанные файлы программ хранятся в каталоге /var/cache/apt/archives (не удаляются после установки). При необходимости их можно удалить командой apt-get clean или apt-get autoclean.

DPKG

  • dpkg -i программа Устанавливает либо обновляет пакет который был установлен ранее.
  • dpkg -r программа Деинсталлирует уже установленную программу но сохраняет файлы конфигурации программы.
  • dpkg -l Отображает список уже установленных пакетов программ.
  • dpkg -l | grep driver Отображает список установленных программ в названии которых есть слово “driver”.
  • dpkg -s программа Показывает информацию по этой программе.
  • dpkg -P программа Удаляет установленную программу вместе с файлом конфигурации.

APT

  • apt-get install программа Установка программы. Можно устанавливать сразу несколько программ. Выглядеть это будет так: apt-get install программа программа программа программа программа программа
  • apt-get update Проверяет, есть ли на репозиториях обновления для установленных программ. Список репозиториев находится в файле /etc/apt/sources.list
  • apt-cdrom install программа Устанавливает либо обновляет пакет с cdrom
  • apt-get upgrade Обновляет уже установленные программы.
  • apt-get remove программа Деинсталлирует установленную программу.
  • apt-get purge программа Удаляет установленный пакет и файлы конфигурации.
  • apt-get autoremove Удаляет пакеты, от которых не зависят другие пакеты.
  • apt-get check Находит конфликтующие пакеты и поломанные зависимости в пакетах программ.
  • apt-get -f install Исправляет найденные поломанные зависимости.
  • apt-cache search программа Поиск программы в кэше.
  • apt-cache show программа Показывает информацию и описание пакета программы.
  • apt-cache showpkg программа Покажет зависимости пакета программы.
  • apt-cache depends программа Отображает в виде списка зависимые пакеты программ нужные для работы выбранной программы

Источник

How To Install pkg-config on Ubuntu 20.04

In this tutorial we learn how to install pkg-config on Ubuntu 20.04.

What is pkg-config

pkg-config is a system for managing library compile and link flags that works with automake and autoconf.

Increasingly libraries ship with “.pc” files that allow querying of the compiler and linker flags needed to use them through the pkg-config(1) program. Description-md5: 5622d544b680cd37e49d3435959207a2 Task: ubuntu-desktop-minimal, ubuntu-desktop, xubuntu-core, xubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop

Читайте также:  Linux узнать название операционной системы

There are three ways to install pkg-config on Ubuntu 20.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install pkg-config Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install pkg-config using apt-get by running the following command:

sudo apt-get -y install pkg-config 

Install pkg-config Using apt

Update apt database with apt using the following command.

After updating apt database, We can install pkg-config using apt by running the following command:

sudo apt -y install pkg-config 

Install pkg-config Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

After updating apt database, We can install pkg-config using aptitude by running the following command:

sudo aptitude -y install pkg-config 

How To Uninstall pkg-config on Ubuntu 20.04

To uninstall only the pkg-config package we can use the following command:

sudo apt-get remove pkg-config 

Uninstall pkg-config And Its Dependencies

To uninstall pkg-config and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove pkg-config 

Remove pkg-config Configurations and Data

To remove pkg-config configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge pkg-config 

Remove pkg-config configuration, data, and all of its dependencies

We can use the following command to remove pkg-config configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge pkg-config 

References

Summary

In this tutorial we learn how to install pkg-config package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.

Источник

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