Manjaro Pamac

Pamac

From Manjaro
Revision as of 13:20, 7 December 2022 by Krotesk (talk | contribs) (Created page with "==Установка программ==")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Deutsch • ‎English • ‎français • ‎русский • ‎עברית • ‎فارسی • ‎中文(中国大陆)‎

Обзор

Pamac (Установка и удаление программ) - это менеджер пакетов Manjaro. Он основан на libalpm с поддержкой AUR и Appstream. Pamac ориентирован на предоставление простого в использовании интерфейса, но при этом обладает мощным набором функций.


Pamac-gtk-main.png

Установка Pamac

Pamac предустановлен во многих редакциях Manjaro, но если в вашей системе его нет, его можно легко установить. Pamac поставляется в нескольких различных пакетах:

  • pamac-gtk - GTK-версия pamac. Включает иконку в трее для многих рабочих столов.
  • pamac-cli - версия pamac для командной строки.
  • pamac-tray-appindicator - значок в трее для плазмы KDE


Эти пакеты можно установить с помощью pacman. Например, чтобы установить версию GTK, вы можете использовать команду:

sudo pacman -Syu pamac-gtk



Tip
Пакеты GTK и Qt Pamac автоматически установят также версию CLI

Использование GUI Pamac

Установка программ

Pamac-gtk-optional-deps.png


Чтобы установить пакеты, просто установите флажки справа от их описания. После выбора всех пакетов, которые вы хотите установить, нажмите кнопку Применить в нижней части страницы.


Если какой-либо из пакетов имеет зависимости (пакеты, обеспечивающие дополнительную функциональность), вы увидите окно, как показано слева, в котором можно выбрать те, которые вы хотите установить.

Pamac-gtk-transaction-summary.png


После выбора необязательных зависимостей вы должны увидеть окно, похожее на то, что изображено слева. Здесь перечислены все пакеты, которые будут установлены, обновлены или удалены в результате этого действия. Просмотрев список нажмите кнопку Применить для установки пакетов.


You may notice this list has more packages than you selected in the GUI. This is because many packages also have dependencies which are packages that must be installed in order for the software you selected to function properly. You may also notice that packages are being removed even though you didn't select any packages to remove. This is happening in the example to the left where you can see clutter and cogl are being removed. They are being removed because they conflict with deepin-clutter and deepin-cogl which provide the same functionality.


Удаление программ

Pamac-gtk-remove-summary.png


Removing software is as simple as unchecking the packages you want to remove and clicking the Apply button at the bottom of the page.


Once you do you should see a screen similar to the one on the left which lists all the packages that are about to be removed. You may notice this list contains more packages than you selected. This is because when you remove a package that other packages depend on, those packages are also removed.


Warning
It is extremely important to carefully review the Transaction Summary before accepting the package removal. Some packages have many packages which depend on them and you don't want to inadvertently remove your whole Desktop Environment

Параметры

You can access the preferences by clicking on the three dots in the upper right corner and selecting preferences.


Pamac-gtk-preferences-general.png


The General tab of preferences contains several settings, most of which are self explanatory.


  • Remove unrequired dependencies - This removes dependencies which are no longer required by any package
  • Check available disk space - Checks to ensure you have sufficient disk space available before downloading and installing packages
  • Maximum parallel downloads - The number of concurrent downloads allowed
  • Enable downgrade - This allows packages to be downgraded as well as upgraded. This is important when switching branches.
  • Check for updates - Disabling this will stop Pamac from looking for updates. In most cases, turning this off on a rolling release distro like Manjaro is a bad idea.
  • Ignore updates for - This is a list of packages that you don't want to be upgraded. This is inherently dangerous practice and should only be used by advanced users.


Warning
Ignoring updates for individual packages will leave you in an unsupported "partial upgrade" state. It is common for innocuous looking ignored packages to leave your system unbootable


Warning
DISCLAIMER: AUR scripts are created for Arch Linux by Arch Linux Users. AUR packages are user-produced content. These PKGBUILDs are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk.
Pamac-gtk-preferences-aur.png

Pamac is also capable of using scripts from the Arch User Repository(AUR) to install or update packages. Please carefully read the considerations in the linked page prior to enabling support for AUR.

If you enable AUR support, you may also select, "Check for updates from AUR" so software you install from AUR won't become outdated. An alternative is creating an account on AURweb and subscribe to notifications for the scripts you are using on a permanent basis.


Checking for "development package" updates will allow updates on *-git packages which are built from the latest source code to also be updated.


The "Build directory" is where AUR packages will be built. Using "tmp" usually will provide the best performance but very large packages may fail to build. In this case, select somewhere with more available space.

Pamac-gtk-preferences-cache.png


When Pamac installs packages, it keeps a copy of all the old packages you have downloaded. This cache can be very useful if you have to download packages in an emergency. However, left unchecked, this cache will grow very large over time. These preferences allow your cache to be automatically managed based on your preferences.


The first option allows you to set a number for how many copies of each package are retained. In other words, if you have downloaded 25 versions of firefox over the life of your install and you set this number to "3", only the most recent 3 versions will be retained. Unless you are very short on disk space, it is recommended to set this to at least 2.


By selecting "Remove only the versions of uninstalled packages" pamac will retain all versions of packages you still have installed.

Использование CLI Pamac

Pamac also includes a fully functional CLI for when you don't have a functional GUI or for those that prefer to manager packages that way.


Нахождение и установка пакетов

To search for available packages you can use the command pamac search. For example, to search the repos for packages containing the word smplayer:

pamac search smplayer
smplayer                                                                                                                                                                                                                                                                                   [Installed] 19.5.0-1    community 
  Media player with built-in codecs that can play virtually all video and audio formats
smplayer-skins                                                                                                                                                                                                                                                                             [Installed] 1:15.2.0-2  community 
  Skins for SMPlayer
smplayer-themes                                                                                                                                                                                                                                                                            [Installed] 1:18.6.0-1  community 
  Themes for SMPlayer


As you can see, this will also show you which packages are already installed. If you would like to search both the repos and AUR you add -a like this:

pamac search -a smplayer
smplayer                                                                                                                                                                                                                                                                              [Installed] 19.5.0-1         community 
  Media player with built-in codecs that can play virtually all video and audio formats
smplayer-skins                                                                                                                                                                                                                                                                        [Installed] 1:15.2.0-2       community 
  Skins for SMPlayer
smplayer-themes                                                                                                                                                                                                                                                                       [Installed] 1:18.6.0-1       community 
  Themes for SMPlayer
papirus-smplayer-theme-git                                                                                                                                                                                                                                                                        20181024-2       AUR 
  Papirus theme for SMPlayer (git version)
smplayer-svn                                                                                                                                                                                                                                                                                      17.12.0.r8852-1  AUR 
  Advanced front-end for MPlayer/MPV
smplayer-svn-notitlebar                                                                                                                                                                                                                                                                           18.3.0.r8982M-1  AUR 
  Advanced front-end for MPlayer/MPV + Patch to disable titlebar in compact mode
smplayer-skins-svn                                                                                                                                                                                                                                                                                15.2.0.r8852-1   AUR 
  Skins for SMPlayer
smplayer-themes-svn                                                                                                                                                                                                                                                                               17.3.0.r8852-1   AUR 
  Themes for SMPlayer
smplayer-qt4                                                                                                                                                                                                                                                                                      18.5.0-1         AUR 
  Complete front-end for MPlayer/MPV (Qt4)
rosa-media-player-plugin                                                                                                                                                                                                                                                                          1.0-2            AUR 
  The new multimedia player(based on SMPlayer) with clean and elegant UI (mozilla plugin only).
smplayer-theme-faenza (Out of Date: 09/15/2017)                                                                                                                                                                                                                                                   2-2              AUR 
  Normal, dark and silver faenza theme for smplayer.
umplayer                                                                                                                                                                                                                                                                                          0.98.2-2         AUR 
  An alternative to SMPlayer


Once you have identified the packages you wish to install you can install them with command pamac install. For example, if we wanted to install smplayer and smplayer-themes we could use the command:

pamac install smplayer smplayer-themes



Tip
When using install pamac will check to see if packages are installed and only install the ones not already installed


If you want to install packages from AUR you use the command pamac build. Sticking with the above example, if you decided you wanted to install umplayer instead you could the command:

pamac build umplayer


Удаление пакетов

The command pamac remove can be used to uninstall packages installed from the repos or AUR. For example if you wanted to remove all the packages installed above you could use the command:

pamac remove smplayer smplayer-themes umplayer



Warning
It is extremely important to carefully review the list of packages pamac presents before confirming. Some packages have many packages which depend on them and you don't want to inadvertently remove your whole Desktop Environment


Определение установленных пакетов

To display a list of all installed packages you can use the command:

pamac list -i


Отображение подробной информации о пакете

To display detailed information on a package that is in the repos or installed on your system use the command pamac info. Keeping with our example:

pamac info smplayer


If you also would like to check packages in AUR you could use:

pamac info -a smplayer


Обновление системы

To check if updates are available you can use the command:

pamac checkupdates -a


To update all installed packages installed from the repos or AUR you can use the command:

pamac upgrade -a



Tip
pamac update and pamac upgrade are exactly the same. You can use them interchangably.


Работа с сиротскими пакетами

To check to see if there any orphaned packages(packages which are no longer needed) installed you can use:

pamac list -o


To remove all orphans use the command:

pamac remove -o


Очистка кэша

When pamac installs packages, it keeps a copy of all the old packages you have downloaded. This cache can be very useful if you have to install older packages in an emergency. However, left unchecked, this cache will grow very large over time.

Otherwise, to clear the cache completely, enter the following command (and use with care):

pamac clean

A safer way to remove old package cache files is to remove all packages except for the latest three package versions using:

pamac clean --keep 3


Другие полезные функции Pamac

To see which package owns a certain file on your system, use the command pamac search -f. For example:

pamac search -f /usr/bin/smplayer


To force a package to be installed even if it is already installed use pamac reinstall. For example:

pamac reinstall smplayer
Cookies help us deliver our services. By using our services, you agree to our use of cookies.