Pacman
lastmod 2020-11-12created 2020-07-1410 edits
The pacman package manager is one of the distinctive main features of Arch Linux. It combines a binary package format with an easy-to-use build system. pacman makes it easy to manage packages, whether from the official Arch repositories or built by users themselves.
pacman keeps the system up to date by syncing package lists with the master server. On top of that, this server/client model lets users download and install packages, along with their required dependencies, with a simple command!
pacman is written in C and uses packages in the .pkg.tar.xz format.
Example
# 시스템 갱신. Pacman은 단 하나의 명령으로 모든 꾸러미들의 판올림이 가능하다. (완전 자동)
pacman -Su
# 다음은, 저장소에 대한 동기화와 동시에 시스템에 대한 판올림을 해준다:
pacman -Syu
# 설치 및 삭제. 설치와 삭제에 앞서 로컬 꾸러미 DB와 원격 저장소를 동기화 시킬 필요성이 있다.
pacman -Sy
# 또는
pacman --sync --refresh
# 하나의 꾸러미 또는 그 이상의 리스트 (여기에는 의존성에 의한 딸림-꾸러미 포함) 에 대한 설치 또는 판올림 명령은 다음과 같다.
pacman -S 꾸러미_이름1 꾸러미_이름2
# 다른 저장소에 있는 꾸러미를 원한다면 (예를들어 extra나 testing), 다음 처럼 기술한다.
pacman -S extra/꾸러미_이름
pacman -S testing/꾸러미_이름
# 꾸러미 설치 전 로컬 꾸러미 DB에 대한 새로 고침:
pacman -S 꾸러미_이름
# 찌꺼기를 남기는, 꾸러미 하나에 대한 삭제
pacman -R 꾸러미_이름
# 설치된 다른 꾸러미가 사용하지 않는 의존적인 꾸러미들의 모든 삭제:
pacman -Rs 꾸러미_이름
# 의존성 검사 없이 꾸러미 삭제
pacman -Rd 꾸러미_이름
# 꾸러미 질의. Pacman은 꾸러미 목록에 대한 꾸러미 DB 검색이 가능하며, 꾸러미 이름의 일부분이라도 일치되는 글자열을 가진 모든 꾸러미들을 검색할 수 있다.
pacman -Ss 꾸러미
# 설치된 꾸러미 목록 출력:
pacman -Q
# 설치된 꾸러미 찾기:
pacman -Qs 꾸러미
# 꾸러미 이름을 알고 있다면, 꾸러미에 대한 정보를 찾아 볼 수 있다. 첨언하자면, query info (-Qi) 는 sync info (-Si) 보다 설치된 꾸러미에 한해서 조금 더 많은 정보를 보여주며, 미설치된 꾸러미 정보는 볼 수 없다.
pacman -Si 꾸러미
pacman -Qi 꾸러미
# 꾸러미에 적재된 파일리스트:
pacman -Ql 꾸러미
# 현재 설치된 꾸러미 가운데 사용되지 않는 파일 리스트:
pacman -Qe
# 또, 시스템에 존재하는 꾸러미 파일을 찾을 수 있다.
pacman -Qo /패스/경로/파일
# 설치 없이 꾸러미 내려받기:
pacman -Sw 꾸러미_이름
# 로컬 꾸러미 설치 (저장소 아님):
pacman -U /패스/경로/꾸러미/꾸러미_이름-버젼.pkg.tar.gz
# 꾸러미 캐쉬를 몽땅 버리기 (/var/cache/pacman/pkg):
pacman -Scc
# 저장소에 포함된 패키지 목록 출력.
pacman -Sl 저장소_이름
Official repositories
core
Includes the following:
- booting Arch Linux
- connecting to the Internet
- building packages
- management and repair of supported file systems
- the system setup process (e.g. openssh)
extra
extra contains all packages that do not fit in core. Example: Xorg, window managers, web browsers, media players, tools for working with languages such as Python and Ruby, and a lot more.
community
community contains packages that have been adopted by Trusted Users from the Arch User Repository. Some of these packages may eventually make the transition to the core or extra repositories as the developers consider them crucial to the distribution.
multilib
You can register your favorite mirror site under .../multilib/os/.
multilib contains 32-bit software and libraries that can be used to run and build 32-bit applications on 64-bit installs (e.g. wine, steam, etc.).
When the multilib repository is enabled, the 32-bit compatible libraries are located under /usr/lib32/.
Enabling multilib
To enable multilib repository, uncomment the [multilib] section in /etc/pacman.conf
Troubleshooting
Fix for key could not be looked up remotely
This is the long video. I do not know the solution and we analyze the problem together with the help of the Arch Wiki.
We have installed ArchMerge 6.2.1 (other ArchMerge and ArchMergeD ssd’s are getting the same error) after asking to update with
Then we get this error about …
First you check the Arch Wiki and read the solution from there.
First thing we try is this
We get an error:
Second thing we try is to update the archlinux-keyring but if you have followed the video than you see that there was no recent update of this package. It is very unlikely that a reinstall will fix our issue.
Third attempt is to reset all pacman keys from this link on Arch Wiki.