1555 lines
62 KiB
Markdown
1555 lines
62 KiB
Markdown
---
|
||
title: "아치 계열 리눅스 패키지 관리자 Pacman 주요 사용법 2 – 캐시 관리, 패키지 정보 조회(검색), 기타 작업 – 씨실과 날실 – IT"
|
||
source: "https://weftnwarp.kr/site-it/archives/%EC%95%84%EC%B9%98-%EA%B3%84%EC%97%B4-%EB%A6%AC%EB%88%85%EC%8A%A4-%ED%8C%A8%ED%82%A4%EC%A7%80-%EA%B4%80%EB%A6%AC%EC%9E%90-pacman-%EC%A3%BC%EC%9A%94-%EC%82%AC%EC%9A%A9%EB%B2%95-2-%EC%BA%90%EC%8B%9C/"
|
||
author:
|
||
published:
|
||
created: 2025-02-08
|
||
description:
|
||
tags:
|
||
- "clippings"
|
||
---
|
||
/ 포스트 조회 수: 112
|
||
|
||
[Home](https://weftnwarp.kr/site-it) » [리눅스](https://weftnwarp.kr/site-it/archives/category/linux/) • [주요 배포판](https://weftnwarp.kr/site-it/archives/category/linux/distributions/) • [Arch 계열](https://weftnwarp.kr/site-it/archives/category/linux/distributions/arch-based/) » 아치 계열 리눅스 패키지 관리자 Pacman 주요 사용법 2 – 캐시 관리, 패키지 정보 조회(검색), 기타 작업
|
||
|
||
이 글은 티스토리 블로그 [https://wnw1005.tistory.com](https://wnw1005.tistory.com/)에서 옮겨온 글입니다.
|
||
|
||
## 캐시 관리
|
||
|
||
### 아치 리눅스 pacman cache 기본 경로
|
||
|
||
아치 리눅스의 캐시 디렉터리 기본값은 아래와 같습니다.
|
||
|
||
> /var/cache/pacman/pkg
|
||
|
||
이 내용은 팩맨의 기본 설정 파일인 /etc/pacman.conf에서 아래와 같이 확인할 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ head -n 23 /etc/pacman.conf | grep CacheDir
|
||
#CacheDir = /var/cache/pacman/pkg/
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
사용자가 캐시 디렉터리를 변경할 수도 있습니다.
|
||
|
||
/etc/pacman.conf 파일을 열어 위 CacheDir 항목의 주석 처리(#)를 지우고 기본값 대신 원하는 경로(절대 경로)를 적어 주시면 됩니다.
|
||
|
||
pacman 핵심 설정
|
||
|
||
열기접기
|
||
|
||
pacman 핵심 설정
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ head -n 23 /etc/pacman.conf
|
||
#
|
||
# /etc/pacman.conf
|
||
#
|
||
# See the pacman.conf(5) manpage for option and repository directives
|
||
|
||
#
|
||
# GENERAL OPTIONS
|
||
#
|
||
[options]
|
||
# The following paths are commented out with their default values listed.
|
||
# If you wish to use different paths, uncomment and update the paths.
|
||
#RootDir = /
|
||
#DBPath = /var/lib/pacman/
|
||
#CacheDir = /var/cache/pacman/pkg/
|
||
#LogFile = /var/log/pacman.log
|
||
#GPGDir = /etc/pacman.d/gnupg/
|
||
#HookDir = /etc/pacman.d/hooks/
|
||
HoldPkg = pacman glibc
|
||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||
#CleanMethod = KeepInstalled
|
||
Architecture = auto
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
캐시 디렉터리 설정 외에 루트 디렉터리, 로컬 패키지 데이터베이스 디렉터리, 로그 파일 경로, GPG키 디렉터리 등의 기본값도 /etc/pacman.conf 파일의 상단부에서 확인할 수 있으며 해당값들을 사용자가 원하는 값으로 수정할 수도 있습니다.
|
||
|
||
/etc/pacman.conf 의 위 상단부 내용 등의 설정값을 사용자가 원하는 대로 수정할 수는 있지만 원활한 시스템 유지보수를 위해 가능하면 기본값 그대로 사용하시는 것을 권장합니다.
|
||
|
||
### 캐시 디렉터리 예시
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg
|
||
합계 2885944
|
||
-rw-r--r-- 1 root root 39197 5월 14 2020 a52dec-0.7.4-11-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 331 5월 14 2020 a52dec-0.7.4-11-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 139582 5월 14 2020 aalib-1.4rc5-14-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 331 5월 14 2020 aalib-1.4rc5-14-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 1748141 11월 13 2020 accerciser-3.38.0-2-any.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 310 11월 13 2020 accerciser-3.38.0-2-any.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 173738 9월 2 2020 accountsservice-0.6.55-3-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 141 9월 2 2020 accountsservice-0.6.55-3-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 139672 3월 16 19:00 acl-2.3.1-1-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 119 3월 16 19:00 acl-2.3.1-1-x86_64.pkg.tar.zst.sig
|
||
|
||
- 생략 -
|
||
|
||
-rw-r--r-- 1 root root 121010 1월 8 2021 zita-resampler-1.8.0-1-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 119 1월 8 2021 zita-resampler-1.8.0-1-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 83444 11월 14 2019 zlib-1:1.2.11-4-x86_64.pkg.tar.xz
|
||
-rw-r--r-- 1 root root 310 11월 14 2019 zlib-1:1.2.11-4-x86_64.pkg.tar.xz.sig
|
||
-rw-r--r-- 1 root root 946526 5월 15 04:35 zstd-1.5.0-1-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 310 5월 15 04:35 zstd-1.5.0-1-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 384319 5월 15 2020 zvbi-0.2.35-4-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 331 5월 15 2020 zvbi-0.2.35-4-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 681171 5월 28 23:05 zxing-cpp-1.2.0-1-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 310 5월 28 23:05 zxing-cpp-1.2.0-1-x86_64.pkg.tar.zst.sig
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
아치 리눅스 시스템 구축 후 캐시디렉터리를 확인해보면 시스템 구성에 사용된 모든 설치 패키지들과 해당 패키지들의 서명 파일이 쌍을 이루어 저장되어 있습니다.
|
||
|
||
### 패키지 데이터베이스 동기화
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Sy
|
||
[sudo] study 암호:
|
||
:: 꾸러미 데이터베이스 동기화 중...
|
||
core 136.2 KiB 994 KiB/s 00:00 [######################] 100%
|
||
extra 1573.2 KiB 965 KiB/s 00:02 [######################] 100%
|
||
community 5.7 MiB 1160 KiB/s 00:05 [######################] 100%
|
||
testing 34.0 KiB 40.4 KiB/s 00:01 [######################] 100%
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위 과정은 시스템 내 로컬 패키지 DB 정보를 활성화되어 있는 아치 리눅스 저장소의 패키지 DB와 동기화하여 최신 정보로 갱신하는 작업입니다. 즉 저장소 내 최신 패키지 정보를 시스템 내 로컬 패키지 DB에 덮어쓰는 작업니다.
|
||
|
||
이렇게 갱신된 로컬 패키지 DB를 바탕으로 패키지 설치 등 관리 작업이 이루어집니다.
|
||
|
||
### 로컬 패키지 데이터베이스
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -lF /var/lib/pacman
|
||
합계 40
|
||
drwxr-xr-x 911 root root 36864 8월 31 19:35 local/
|
||
drwxr-xr-x 2 root root 4096 8월 30 22:17 sync/
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위는 아치 리눅스의 기본 패키지 데이터베이스 디렉터리의 구성 내용입니다.
|
||
|
||
/var/lib/pacman/local은 시스템에 설치된 패키지에 대한 정보가 담긴 디렉터리입니다.
|
||
|
||
/var/lib/pacman/sync는 아치 저장소의 패키지 정보를 담은 로컬 패키지 데이터베이스 파일이 저장된 디렉터리입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -lF /var/lib/pacman/local
|
||
합계 3644
|
||
-rw-r--r-- 1 root root 2 6월 29 11:06 ALPM_DB_VERSION
|
||
drwxr-xr-x 2 root root 4096 8월 30 16:48 a52dec-0.7.4-11/
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:43 aalib-1.4rc5-14/
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:44 accerciser-3.38.0-2/
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:43 accountsservice-0.6.55-3/
|
||
drwxr-xr-x 2 root root 4096 6월 29 11:07 acl-2.3.1-1/
|
||
|
||
- 생략 -
|
||
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:43 zita-resampler-1.8.0-1/
|
||
drwxr-xr-x 2 root root 4096 6월 29 11:07 zlib-1:1.2.11-4/
|
||
drwxr-xr-x 2 root root 4096 6월 29 11:07 zstd-1.5.0-1/
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:43 zvbi-0.2.35-4/
|
||
drwxr-xr-x 2 root root 4096 6월 29 22:43 zxing-cpp-1.2.0-1/
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위는 /var/lib/pacman/local 디렉터리의 목록 예시입니다.
|
||
|
||
위 명령을 치면 해당 디렉터리(/var/lib/pacman/local) 안에 포함된 파일과 디렉터리 개수를 확인할 수 있습니다.
|
||
|
||
이 디렉터리 안에는 시스템에 설치되어 있는 패키지에 대한 정보가 아래와 같은 구성으로 담겨져 있습니다.
|
||
|
||
아래는 tree 패키지의 예입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ tree /var/lib/pacman/local/tree-*
|
||
/var/lib/pacman/local/tree-1.8.0-2
|
||
├── desc
|
||
├── files
|
||
└── mtree
|
||
|
||
0 directories, 3 files
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
그리고 아래는 tree 패키지 디렉터리 안에 포함된 파일의 내용입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ cat -n /var/lib/pacman/local/tree-*/desc
|
||
1 %NAME%
|
||
2 tree
|
||
3
|
||
4 %VERSION%
|
||
5 1.8.0-2
|
||
6
|
||
7 %BASE%
|
||
8 tree
|
||
9
|
||
10 %DESC%
|
||
11 A directory listing program displaying a depth indented list of files
|
||
12
|
||
13 %URL%
|
||
14 http://mama.indstate.edu/users/ice/tree/
|
||
15
|
||
16 %ARCH%
|
||
17 x86_64
|
||
18
|
||
19 %BUILDDATE%
|
||
20 1587571345
|
||
21
|
||
22 %INSTALLDATE%
|
||
23 1630742819
|
||
24
|
||
25 %PACKAGER%
|
||
26 Jelle van der Waa <*****@*****.***>
|
||
27
|
||
28 %SIZE%
|
||
29 94661
|
||
30
|
||
31 %LICENSE%
|
||
32 GPL
|
||
33
|
||
34 %VALIDATION%
|
||
35 pgp
|
||
36
|
||
37 %DEPENDS%
|
||
38 glibc
|
||
39
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
desc 파일은 description의 약자에 걸맞게 해당 패키지에 대한 각종 정보가 포함되어 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ cat -n /var/lib/pacman/local/tree-*/files
|
||
1 %FILES%
|
||
2 usr/
|
||
3 usr/bin/
|
||
4 usr/bin/tree
|
||
5 usr/share/
|
||
6 usr/share/man/
|
||
7 usr/share/man/man1/
|
||
8 usr/share/man/man1/tree.1.gz
|
||
9
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
해당 패키지의 파일 등이 시스템에 설치된 경로를 모아놓은 파일입니다.
|
||
|
||
mtree 파일은 해당 패키지의 “디렉토리 계층 구조 매핑”에 사용되는 파일입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -lF /var/lib/pacman/local | wc -l
|
||
912
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
/var/lib/pacman/local 디렉터리에서 ls와 wc 명령을 이용해 설치 퍀지 수를 구하려면 위에서 출력된 숫자에서 -2을 해주어야 합니다. 그 이유는 wc -l 명령은 전항 명령에 대한 터미널 출력 내용의 줄 수를 표시한 것입니다.
|
||
|
||
그런데 ls -l 명령을 사용하면 먼저 행별로 파일 및 디렉터리에 대한 상세 정보 뿐만 아니라 맨 위에 total 항목이 함께 출력되는데 이 total 항목은 명령의 대상이 된 디렉터리 및 파일들이 차지하는 총 블록 수를 의미합니다.
|
||
|
||
이 블록 수 정보는 당연히 우리가 운하는 파일 개수 정보에 포함되지 않으므로 제외해주어야 합니다.
|
||
|
||
두 번째로 /var/lib/pacman/local 디렉터리 안에는 ALPM\_DB\_VERSION 파일이 있는데 해당 파일은 Arch Linux Package Management (ALPM)의 버전 정보가 담긴 것입니다.
|
||
|
||
따라서 위 명령에서 912가 표시되었다면 해당 디렉터리(/var/lib/pacman/local) 를 토대로 아치 리눅스 시스템에 설치된 패키지의 총 수는 910개인 것입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -lF /var/lib/pacman/sync
|
||
합계 7552
|
||
-rw-r--r-- 1 root root 5937572 8월 31 18:35 community.db
|
||
-rw-r--r-- 1 root root 139430 8월 31 18:05 core.db
|
||
-rw-r--r-- 1 root root 1611004 8월 31 18:02 extra.db
|
||
-rw-r--r-- 1 root root 34803 8월 31 18:05 testing.db
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
/var/lib/pacman/sync 디렉터리에는 아치리눅스에 활성화되어 있는(또는 활성화된 적이 있던) 아치 패키지 저장소 DB 동기화 파일이 있습니다.
|
||
|
||
이 파일을 토대로 패키지 설치 등 저장소 관련 작업이 수행됩니다.
|
||
|
||
### 패키지 다운로드
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Sw tree mc
|
||
의존성 해결 중...
|
||
|
||
꾸러미 (2) mc-4.8.27-1 tree-1.8.0-2
|
||
|
||
총 다운로드 크기: 1.85 MiB
|
||
|
||
:: 다운로드를 진행하시겠습니까? [Y/n]
|
||
:: 꾸러미 가져오는 중...
|
||
mc-4.8.27-1-x86_64 1896.5 KiB 3.68 MiB/s 00:01 [######################] 100%
|
||
(2/2) 키링의 키를 검사 중 [######################] 100%
|
||
(2/2) 꾸러미 무결성 검사 중 [######################] 100%
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-Sw 옵션을 사용하면 패키지를 다운로드할 뿐 설치 작업을 하지 않습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg | egrep -w '(tree|mc)'
|
||
-rw-r--r-- 1 root root 1942028 8월 18 22:42 mc-4.8.27-1-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 310 8월 18 22:42 mc-4.8.27-1-x86_64.pkg.tar.zst.sig
|
||
-rw-r--r-- 1 root root 34195 4월 23 2020 tree-1.8.0-2-x86_64.pkg.tar.zst
|
||
-rw-r--r-- 1 root root 310 4월 23 2020 tree-1.8.0-2-x86_64.pkg.tar.zst.sig
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
패키지를 다운로드하면 위와 같이 /var/cache/pacman/pkg 디렉터리에 저장됩니다.
|
||
|
||
이때 패키지 파일과 패키지 서명 파일이 쌍으로 저장됩니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg | wc -l
|
||
1819
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
일반적으로 위 명령을 실행해 나타나는 숫자에서 1만큼 빼고 그 다음 2로 나눈 값이 다운로드된 패키지 수입니다.
|
||
|
||
1을 빼는 이유는 앞서 설명한 바와 같이 ls명령을 사용하면 합계(total) 항목(= 점유하는 블록 수)이 출력되므로 해당 항목 줄을 제외하기 위함입니다.
|
||
|
||
### testing 저장소 비활성화
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo nano /etc/pacman.conf
|
||
```
|
||
|
||
활성화했던 저장소를 비활성화하려면 /etc/pacman.conf 파일을 열어 저장소 구성 항목을 아래처럼 주석처리해주시면 됩니다.
|
||
|
||
```
|
||
#[testing]
|
||
#Include = /etc/pacman.d/mirrorlist
|
||
```
|
||
|
||
물론 해당 내용을 단순히 주석처리하는 것이 아니라 삭제해도 같은 효과를 내지만 추후 저장소 재활성화 등에 대비해 단지 주석처리 해주시는 것이 시스템 관리상 좋습니다.
|
||
|
||
### 설치되지 않은 캐시된 패키지 및 미사용 동기화 데이터베이스 삭제
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Sc
|
||
유지할 꾸러미:
|
||
로컬에 설치한 모든 꾸러미
|
||
|
||
캐시 디렉터리: /var/cache/pacman/pkg/
|
||
:: 모든 기타 꾸러미를 캐시에서 제거하시겠습니까? [Y/n]
|
||
캐시에서 오래된 꾸러미 제거 중...
|
||
|
||
데이터베이스 디렉터리: /var/lib/pacman/
|
||
:: 사용하지 않는 저장소를 제거하시겠습니까? [Y/n]
|
||
사용하지 않는 동기화 저장소 제거 중...
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
캐시 디렉터리에 다운로드만 되고 설치는 되지 않은 패키지와 지금은 비활성화되어 불필요한 저장소 동기화 데이터베이스 파일을 삭제하고자 할 때 위와 같이 -Sc 옵션을 사용합니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg | egrep -w '(tree|mc)'
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
$ sudo pacman -Sc 명령을 실행한 후 설치는 하지 않고 다운로드만 했던 두 패키지를 캐시 디렉터리에서 찾아보니 위와 ㄱㅌ이 아무것도 출력되지 않습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg | wc -l
|
||
1815
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
그리고 wc -l 명령 실행값이 아까보다 4만큼 줄어든 것을 확인할 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/lib/pacman/sync
|
||
합계 7516
|
||
-rw-r--r-- 1 root root 5937572 8월 31 18:35 community.db
|
||
-rw-r--r-- 1 root root 139430 8월 31 18:05 core.db
|
||
-rw-r--r-- 1 root root 1611004 8월 31 18:02 extra.db
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
그리고 testing 저장소 DB 파일도 삭제된 것을 확인할 수 있습니다.
|
||
|
||
### 캐시에서 모든 파일 제거
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Scc
|
||
|
||
캐시 디렉터리: /var/cache/pacman/pkg/
|
||
:: 캐시에서 모든 파일을 제거하시겠습니까? [y/N] y
|
||
캐시에서 모든 파일 제거 중...
|
||
|
||
데이터베이스 디렉터리: /var/lib/pacman/
|
||
:: 사용하지 않는 저장소를 제거하시겠습니까? [Y/n] y
|
||
사용하지 않는 동기화 저장소 제거 중...
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
시스템의 캐시 디렉터리에 있는 모든 파일과 사용되지 않는 저장소 DB 파일을 제거할 땐 -Scc 옵션을 사용합니다.
|
||
|
||
이때 주의할 점은 캐시에서 모든 파일을 제거할 때는 평소처럼 단순히 엔터키만 누르는 것이 아니라 명시적으로 y키를 입력하고 엔터키를 눌러주어야 합니다.
|
||
|
||
그렇지 않으면(즉 엔터키만 누르면) 캐시 디렉터리에 있는 패키지들이 제거되지 않는데 그 이유는 캐시에서 모든 파일을 제거 작업은 \[y/N\]에서 보듯 No가 기본값이기 때문입니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/cache/pacman/pkg
|
||
합계 0
|
||
[study@study-virtualbox ~]$
|
||
|
||
study@study-virtualbox ~]$ ls -l /var/lib/pacman/sync
|
||
합계 7516
|
||
-rw-r--r-- 1 root root 5937572 8월 31 18:35 community.db
|
||
-rw-r--r-- 1 root root 139430 8월 31 18:05 core.db
|
||
-rw-r--r-- 1 root root 1611004 8월 31 18:02 extra.db
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
$ sudo pacman -Scc 명령을 실행한 후 위처럼 캐시 디렉터리 내 목록과 저장소 패키지 DB 파일이 위와 같이 출력됩니다.
|
||
|
||
---
|
||
|
||
## 패키지 정보 조회(검색)
|
||
|
||
### 패키지 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Ss apache
|
||
extra/ant 1.10.11-1
|
||
Java based build tool
|
||
extra/ant-doc 1.10.11-1
|
||
Apache Ant build tool documentation
|
||
extra/apache 2.4.48-1 [설치함]
|
||
A high performance Unix-based HTTP server
|
||
extra/apr 1.7.0-3 [설치함]
|
||
The Apache Portable Runtime
|
||
extra/apr-util 1.6.1-8 [설치함]
|
||
The Apache Portable Runtime
|
||
extra/java-jsvc 1.2.4-1
|
||
Apache application for making Java applications run on UNIX more easily
|
||
extra/mod_dnssd 0.6-8 [설치함]
|
||
Zeroconf module for Apache2
|
||
extra/mod_fcgid 2.3.9-5
|
||
A FastCGI module for Apache HTTP Server.
|
||
extra/php-apache 8.0.10-1
|
||
Apache SAPI for PHP
|
||
extra/php7-apache 7.4.23-1
|
||
Apache SAPI for PHP
|
||
community/apache-orc 1.6.9-1
|
||
Columnar storage for Hadoop workloads.
|
||
community/certbot-apache 1.18.0-1
|
||
Apache plugin for Let’s Encrypt client
|
||
community/dbeaver-plugin-apache-poi 4.1.1-2
|
||
DBeaver library for Microsoft Office documents
|
||
community/librdkafka 1.7.0-2
|
||
The Apache Kafka C/C++ library
|
||
community/mod_itk 2.4.7.r04-1
|
||
Apache mpm itk module that allows you to run each of your vhost under a
|
||
separate uid and gid
|
||
community/mod_passenger 6.0.10-1
|
||
Passenger apache module
|
||
community/python-kazoo 2.8.0-2
|
||
A high-level Python library that makes it easier to use Apache Zookeeper
|
||
community/python-thrift 0.14.0-1
|
||
Python bindings for the Apache Thrift RPC system
|
||
community/solr 8.8.2-1
|
||
Open source enterprise search platform built on Apache Lucene
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
동기화 데이터베이스(= 저장소)를 기준으로, 패키지 이름과 설명에 포함된 문자열을 토대로 패키지를 검색합니다.
|
||
|
||
패키지 설치 여부에 상관없이 주어진 문자열을 포함하고 있는 패키지를 검색하며, 시스템에 설치되어 있는 것인 경우 \[설치함\] 또는 \[installed\]가 표시됩니다.
|
||
|
||
### 확장 정규표현식(ERE)을 이용한 패키지 검색
|
||
|
||
때로는 단순히 문자열만 입력해서는 패키지를 쉽게 찾을 수 없습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Ss '^vim$'
|
||
extra/gvim 8.2.2891-1
|
||
Vi Improved, a highly configurable, improved version of the vi text editor
|
||
(with advanced features, such as a GUI)
|
||
extra/vim 8.2.2891-1 [설치함]
|
||
Vi Improved, a highly configurable, improved version of the vi text editor
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위와 같이 정규표현식을 이용해 검색해 검색 범위를 좁히는 것이 좋습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Ss vim
|
||
extra/gvim 8.2.2891-1
|
||
Vi Improved, a highly configurable, improved version of the vi text editor
|
||
(with advanced features, such as a GUI)
|
||
extra/vim 8.2.2891-1 [설치함]
|
||
Vi Improved, a highly configurable, improved version of the vi text editor
|
||
extra/vim-runtime 8.2.2891-1 [설치함]
|
||
Vi Improved, a highly configurable, improved version of the vi text editor
|
||
(shared runtime)
|
||
community/firefox-tridactyl 1.21.1-2 (firefox-addons)
|
||
Replace Firefox's control mechanism with one modelled on Vim
|
||
community/grub-theme-vimix 20190605-2
|
||
A blur theme for grub
|
||
community/neovim 0.5.0-1
|
||
Fork of Vim aiming to improve user experience, plugins, and GUIs
|
||
community/neovim-qt 0.2.16.1-1
|
||
GUI for Neovim
|
||
community/notmuch-vim 0.32.3-1
|
||
Vim plugins for notmuch
|
||
community/powerline 2.8.2-2
|
||
Statusline plugin for vim, and provides statuslines and prompts for several
|
||
other applications, including zsh, bash, tmux, IPython, Awesome, i3 and
|
||
Qtile
|
||
community/powerline-vim 2.8.2-2
|
||
vim plugin for powerline
|
||
community/python-pynvim 0.4.3-1
|
||
Python client for Neovim
|
||
community/qutebrowser 2.3.1-1
|
||
A keyboard-driven, vim-like browser based on PyQt5
|
||
community/ranger 1.9.3-3
|
||
Simple, vim-like file manager
|
||
community/ruby-vimrunner 0.3.4-2
|
||
Spawn a Vim instance and control it programatically
|
||
community/vim-airline 0.11-1 (vim-plugins)
|
||
Status line, written in Vimscript
|
||
community/vim-airline-themes r1386.63b66df-1 (vim-plugins)
|
||
Themes for vim-airline
|
||
community/vim-ale 3.1.0-1 (vim-plugins)
|
||
Asynchronous Lint Engine with Language Server Protocol (LSP) support
|
||
community/vim-align 37.43-5 (vim-plugins)
|
||
Lets you align lines using regular expressions
|
||
community/vim-ansible 3.2-1 (vim-plugins)
|
||
A vim plugin for syntax highlighting Ansible's common filetypes
|
||
community/vim-bufexplorer 7.4.19-2 (vim-plugins)
|
||
Simple buffer list/switcher for vim
|
||
community/vim-coverage-highlight 3.4-1 (vim-plugins)
|
||
Vim plugin to highlight Python source code lines that lack test coverage
|
||
community/vim-csound 0.8.1-1 (vim-plugins)
|
||
Csound tools for Vim
|
||
community/vim-ctrlp 1.80-3 (vim-plugins)
|
||
Fuzzy file, buffer, mru, tag, etc finder.
|
||
community/vim-easymotion 3.0.1-5 (vim-plugins)
|
||
Vim motion on speed
|
||
community/vim-editorconfig 1.1.1-1 (vim-plugins)
|
||
EditorConfig plugin for Vim
|
||
community/vim-fugitive 3.2-1 (vim-plugins)
|
||
Git wrapper so awesome, it should be illegal
|
||
community/vim-gitgutter 708.c27bfab-1 (vim-plugins)
|
||
Vim plugin which shows a git diff in the gutter (sign column)
|
||
community/vim-grammalecte r31.09d4b24-1 (vim-plugins)
|
||
Integrates Grammalecte into Vim
|
||
community/vim-himalaya 0.4.0-3
|
||
A CLI email client - Vim UI plugin
|
||
community/vim-indent-object 1.1.2-7 (vim-plugins)
|
||
Text objects based on indent levels
|
||
community/vim-jad 1.3_1329-4 (vim-plugins)
|
||
Automatically decompile Java class files and display Java code
|
||
community/vim-jedi 0.11.0-1 (vim-plugins)
|
||
Vim plugin for jedi, an awesome Python autocompletion
|
||
community/vim-latexsuite 1:1.10.0-3 (vim-plugins)
|
||
Tools to view, edit, and compile LaTeX documents within Vim.
|
||
community/vim-molokai 1.1-7 (vim-plugins)
|
||
Port of the monokai colorscheme for TextMate
|
||
community/vim-nerdcommenter 2.5.2-2 (vim-plugins)
|
||
Plugin that allows for easy commenting of code for many filetypes
|
||
community/vim-nerdtree 6.10.11-1 (vim-plugins)
|
||
Tree explorer plugin for navigating the filesystem
|
||
community/vim-pastie 2.0-10 (vim-plugins)
|
||
A Vim plugin that lets you read and create pastes at http://pastie.org/
|
||
community/vim-seti 1.0-4 (vim-plugins)
|
||
Colorscheme based on Jesse Weed's Seti theme for the Atom editor
|
||
community/vim-spell-af 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-am 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-bg 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-br 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ca 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-cs 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-cy 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-da 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-de 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-el 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-en 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-eo 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-es 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-fo 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-fr 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ga 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-gd 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-gl 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-he 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-hr 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-hu 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-id 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-it 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ku 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-la 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-lt 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-lv 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-mg 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-mi 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ms 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-nb 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-nl 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-nn 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ny 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-pl 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-pt 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ro 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-ru 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-rw 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-sk 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-sl 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-sr 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-sv 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-sw 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-tet 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-th 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-tl 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-tn 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-uk 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-yi 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-spell-zu 20190731-2
|
||
Language files for Vim spell checking
|
||
community/vim-supertab 2.1-4 (vim-plugins)
|
||
A Vim plugin that allows you to use the tab key to do all insert completion.
|
||
community/vim-surround 2.1-4 (vim-plugins)
|
||
Provides mappings to easily delete, change, and add paired surroundings
|
||
community/vim-syntastic 3.10.0-2 (vim-plugins)
|
||
Automatic syntax checking for Vim
|
||
community/vim-tabular 1.0.0+5+g339091a-1 (vim-plugins)
|
||
Vim script for text filtering and alignment
|
||
community/vim-tagbar 3.0.0-1 (vim-plugins)
|
||
Plugin to browse the tags of the current file and get an overview of its
|
||
structure
|
||
community/vim-ultisnips 3.2-5 (vim-plugins)
|
||
TextMate-style snippets for Vim.
|
||
community/vim-vital 1:3113.982e0bf3-2 (vim-plugins)
|
||
Comprehensive Vim utility functions for Vim plugins
|
||
community/vimb 3.6.0-1
|
||
The vim like browser
|
||
community/vimiv 0.9.1-4
|
||
Image viewer with vim-like keybindings
|
||
community/vimpager 2.06-5
|
||
A vim-based script to use as a PAGER.
|
||
community/vint 0.3.20-3
|
||
Lint tool for Vim script Language
|
||
community/vis 0.7-2
|
||
modern, legacy free, simple yet efficient vim-like editor
|
||
community/vit 2.1.0-1
|
||
Terminal interface for Taskwarrior with Vim key bindings and colorization
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
만약 단순히 패키지명만 검색 문자열로 적으면 위와 같이 사용자가 원하지 않는 많은 패키지들까지 검색되어 원하는 패키지를 찾기가 쉽지 않습니다.
|
||
|
||
### 설치된 패키지 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qs vlc
|
||
local/vlc 3.0.16-3
|
||
Multi-platform MPEG, VCD/DVD, and DivX player
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-Ss 옵션과는 달리 -Qs 옵션은 시스템에 설치되어 있는 패키지만 검색됩니다.
|
||
|
||
따라서 굳이 \[설치함\] 또는 \[installed\] 표시가 나타나지 않습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Ss vlc
|
||
extra/phonon-qt5-vlc 0.11.3-1
|
||
Phonon VLC backend for Qt5
|
||
extra/vlc 3.0.16-3 [설치함]
|
||
Multi-platform MPEG, VCD/DVD, and DivX player
|
||
community/playerctl 2.3.1-1
|
||
mpris media player controller and lib for spotify, vlc, audacious, bmp,
|
||
xmms2, and others.
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-Ss 옵션을 사용하면 검색 범위가 저장소(동기화 데이터베이스)로 확대되기 떄문에 그중 시스템에 설치되어 있는 것은 따로 표시해 줄 필요가 있어 \[설치함\] 또는 \[installed\] 표시가 나타납니다.
|
||
|
||
### 파일 검색 데이터베이스 다운로드
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Fy
|
||
[sudo] study 암호:
|
||
:: 꾸러미 데이터베이스 동기화 중...
|
||
core 935.3 KiB 1788 KiB/s 00:01 [######################] 100%
|
||
extra 9.3 MiB 5.94 MiB/s 00:02 [######################] 100%
|
||
community 23.6 MiB 4.89 MiB/s 00:05 [######################] 100%
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
특정 파일을 소유 중인 패키지를 검색할 때 필요한 데이터베이스를 다운로드/갱신합니다.
|
||
|
||
이 작업을 통해 다운로드/갱신되는 데이터베이스는 일반 패키지 데이터베이스와 위치가 같습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ ls -l /var/lib/pacman/sync
|
||
합계 42188
|
||
-rw-r--r-- 1 root root 5937572 8월 31 18:35 community.db
|
||
-rw-r--r-- 1 root root 24770865 9월 1 10:19 community.files
|
||
-rw-r--r-- 1 root root 139430 8월 31 18:05 core.db
|
||
-rw-r--r-- 1 root root 957710 8월 31 18:05 core.files
|
||
-rw-r--r-- 1 root root 1611004 8월 31 18:02 extra.db
|
||
-rw-r--r-- 1 root root 9770709 9월 1 07:30 extra.files
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위 예에서 확장자가 db로 끝나는 파일이 일반적으로 설치, 업그레이드 작업에 사용되는 패키지 데이터베이스라면,
|
||
|
||
확장자가 files로 끝나는 파일은 특정 파일을 포함하고 있는 패키지를 찾을 때 사용하는 파일 소유 검색 패키지 데이터베이스입니다.
|
||
|
||
### 저장소에서 특정 파일을 소유한 패키지를 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -F smplayer_ko.qm
|
||
community/smplayer 21.8.0-1
|
||
usr/share/smplayer/translations/smplayer_ko.qm
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
지정한 파일을 소유한 패키지를 검색합니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -F tree
|
||
extra/tree 1.8.0-2 [설치함]
|
||
usr/bin/tree
|
||
community/sugar-activity-pippy 75-1 (sugar-fructose)
|
||
usr/share/sugar/activities/Pippy.activity/data/en/graphics/tree
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
물론 동명의 파일을 서로 다른 패키지가 소유하는 경우도 있습니다.
|
||
|
||
### 특정 경로 파일을 소유한 패키지 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -F /usr/bin/tree
|
||
usr/bin/tree는 extra/tree 1.8.0-2가 소유했습니다
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
파일 검색 패키지 데이터베이스에 쿼리하여 특정 경로의 파일이 속하는 원격 패키지를 검색합니다.
|
||
|
||
### 지정 패키지가 소유한 디렉터리 및 파일 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Fl smplayer
|
||
smplayer usr/
|
||
smplayer usr/bin/
|
||
smplayer usr/bin/simple_web_server
|
||
smplayer usr/bin/smplayer
|
||
smplayer usr/share/
|
||
smplayer usr/share/applications/
|
||
smplayer usr/share/applications/smplayer.desktop
|
||
smplayer usr/share/applications/smplayer_enqueue.desktop
|
||
smplayer usr/share/doc/
|
||
smplayer usr/share/doc/smplayer/
|
||
smplayer usr/share/doc/smplayer/Copying.txt
|
||
smplayer usr/share/doc/smplayer/Copying_BSD.txt
|
||
smplayer usr/share/doc/smplayer/Copying_libmaia.txt
|
||
smplayer usr/share/doc/smplayer/Copying_openssl.txt
|
||
smplayer usr/share/doc/smplayer/Install.txt
|
||
smplayer usr/share/doc/smplayer/Portable_Edition.txt
|
||
smplayer usr/share/doc/smplayer/Readme.txt
|
||
smplayer usr/share/doc/smplayer/Release_notes.md
|
||
smplayer usr/share/doc/smplayer/cs/
|
||
smplayer usr/share/doc/smplayer/cs/gpl.html
|
||
smplayer usr/share/doc/smplayer/de/
|
||
smplayer usr/share/doc/smplayer/de/gpl.html
|
||
smplayer usr/share/doc/smplayer/en/
|
||
smplayer usr/share/doc/smplayer/en/gpl.html
|
||
smplayer usr/share/doc/smplayer/es/
|
||
smplayer usr/share/doc/smplayer/es/gpl.html
|
||
smplayer usr/share/doc/smplayer/fr/
|
||
smplayer usr/share/doc/smplayer/fr/gpl.html
|
||
smplayer usr/share/doc/smplayer/hu/
|
||
smplayer usr/share/doc/smplayer/hu/gpl.html
|
||
smplayer usr/share/doc/smplayer/it/
|
||
smplayer usr/share/doc/smplayer/it/gpl.html
|
||
smplayer usr/share/doc/smplayer/ja/
|
||
smplayer usr/share/doc/smplayer/ja/gpl.html
|
||
smplayer usr/share/doc/smplayer/nl/
|
||
smplayer usr/share/doc/smplayer/nl/gpl.html
|
||
smplayer usr/share/doc/smplayer/ro/
|
||
smplayer usr/share/doc/smplayer/ro/gpl.html
|
||
smplayer usr/share/doc/smplayer/ru/
|
||
smplayer usr/share/doc/smplayer/ru/gpl.html
|
||
smplayer usr/share/doc/smplayer/zh_CN/
|
||
smplayer usr/share/doc/smplayer/zh_CN/gpl.html
|
||
smplayer usr/share/icons/
|
||
smplayer usr/share/icons/hicolor/
|
||
smplayer usr/share/icons/hicolor/128x128/
|
||
smplayer usr/share/icons/hicolor/128x128/apps/
|
||
smplayer usr/share/icons/hicolor/128x128/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/16x16/
|
||
smplayer usr/share/icons/hicolor/16x16/apps/
|
||
smplayer usr/share/icons/hicolor/16x16/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/192x192/
|
||
smplayer usr/share/icons/hicolor/192x192/apps/
|
||
smplayer usr/share/icons/hicolor/192x192/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/22x22/
|
||
smplayer usr/share/icons/hicolor/22x22/apps/
|
||
smplayer usr/share/icons/hicolor/22x22/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/256x256/
|
||
smplayer usr/share/icons/hicolor/256x256/apps/
|
||
smplayer usr/share/icons/hicolor/256x256/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/32x32/
|
||
smplayer usr/share/icons/hicolor/32x32/apps/
|
||
smplayer usr/share/icons/hicolor/32x32/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/512x512/
|
||
smplayer usr/share/icons/hicolor/512x512/apps/
|
||
smplayer usr/share/icons/hicolor/512x512/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/64x64/
|
||
smplayer usr/share/icons/hicolor/64x64/apps/
|
||
smplayer usr/share/icons/hicolor/64x64/apps/smplayer.png
|
||
smplayer usr/share/icons/hicolor/scalable/
|
||
smplayer usr/share/icons/hicolor/scalable/apps/
|
||
smplayer usr/share/icons/hicolor/scalable/apps/smplayer.svg
|
||
smplayer usr/share/man/
|
||
smplayer usr/share/man/man1/
|
||
smplayer usr/share/man/man1/smplayer.1.gz
|
||
smplayer usr/share/metainfo/
|
||
smplayer usr/share/metainfo/smplayer.appdata.xml
|
||
smplayer usr/share/smplayer/
|
||
smplayer usr/share/smplayer/input.conf
|
||
smplayer usr/share/smplayer/shortcuts/
|
||
smplayer usr/share/smplayer/shortcuts/default.keys
|
||
smplayer usr/share/smplayer/shortcuts/euskara.keys
|
||
smplayer usr/share/smplayer/shortcuts/vlc.keys
|
||
smplayer usr/share/smplayer/translations/
|
||
smplayer usr/share/smplayer/translations/smplayer_am.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ar.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ar_SY.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_bg.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ca.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_cs.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_da.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_de.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_el.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_en.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_en_GB.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_en_US.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_es.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_es_ES.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_et.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_eu.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_fa.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_fi.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_fr.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_gl.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_he_IL.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_hr.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_hu.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_id.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_it.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ja.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ka.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ko.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ku.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_lt.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_mk.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ms_MY.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_nb_NO.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_nl.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_nn_NO.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_pl.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_pt.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_pt_BR.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ro_RO.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_ru_RU.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_sk.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_sl_SI.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_sq_AL.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_sr.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_sv.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_th.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_tr.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_uk_UA.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_uz.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_vi_VN.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_zh_CN.qm
|
||
smplayer usr/share/smplayer/translations/smplayer_zh_TW.qm
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
지정 패키지가 소유한 모든 디렉터리 및 파일을 나열합니다.
|
||
|
||
### 저장소 내 패키지 정보 확인
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Si smplayer
|
||
저장소 : community
|
||
이름 : smplayer
|
||
버전 : 21.8.0-1
|
||
설명 : Media player with built-in codecs that can play virtually
|
||
all video and audio formats
|
||
아키텍처 : x86_64
|
||
URL : https://www.smplayer.info/
|
||
라이선스 : GPL
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : glibc qt5-script qt5-base mpv libx11 zlib gcc-libs
|
||
hicolor-icon-theme
|
||
선택 의존성 : smplayer-themes: icon themes collection
|
||
smplayer-skins: skin themes collection
|
||
smtube: browse and play youtube videos
|
||
youtube-dl: youtube videos and streaming
|
||
mplayer: alternative multimedia engine
|
||
다음과 충돌 : 없음
|
||
다음을 대체 : 없음
|
||
다운로드 크기 : 3.49 MiB
|
||
설치된 크기 : 15.52 MiB
|
||
꾸러미 만든이 : Caleb Maclennan <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
유효검사자 : MD5 합 SHA-256 합 서명
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위와 같이 지정 패키지에 대한 일반적인 정보를 확인할 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Sii smplayer
|
||
저장소 : community
|
||
이름 : smplayer
|
||
버전 : 21.8.0-1
|
||
설명 : Media player with built-in codecs that can play virtually
|
||
all video and audio formats
|
||
아키텍처 : x86_64
|
||
URL : https://www.smplayer.info/
|
||
라이선스 : GPL
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : glibc qt5-script qt5-base mpv libx11 zlib gcc-libs
|
||
hicolor-icon-theme
|
||
선택 의존성 : smplayer-themes: icon themes collection
|
||
smplayer-skins: skin themes collection
|
||
smtube: browse and play youtube videos
|
||
youtube-dl: youtube videos and streaming
|
||
mplayer: alternative multimedia engine
|
||
다음이 요구 : smplayer-skins smplayer-themes
|
||
다음의 선택 의존성 : smtube
|
||
다음과 충돌 : 없음
|
||
다음을 대체 : 없음
|
||
다운로드 크기 : 3.49 MiB
|
||
설치된 크기 : 15.52 MiB
|
||
꾸러미 만든이 : Caleb Maclennan <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
MD5 합 : 3ef867ea9c6e85c9696cb632c2039233
|
||
SHA-256 합 : d7ff2e0a30ad28e8a780be391ff275443f43af5fcd6d91106807bdbb5d01fe9f
|
||
서명들 : A85E811EB4CA2E08
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-i 옵션을 두번 사용하면 위와 같이 보다 자세한 내용을 확인할 수 있습니다.
|
||
|
||
다음이 요구, 다음의 선택 의존성, MD5와 SHA-256 해시 정보, 서명 정보 등의 추가 정보를 확인할 수 있게 됩니다.
|
||
|
||
### 설치된 패키지들 중 해당 문자열 포함 패키지 검색
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Q apache
|
||
apache 2.4.48-1
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
설치된 패키지들 중 패키지명과 설명 안에 해당 문자열이 포함된 패키지를 검색합니다.
|
||
|
||
### 설치된 패키지의 정보 확인
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Qi mc
|
||
이름 : mc
|
||
버전 : 4.8.27-1
|
||
설명 : A file manager that emulates Norton Commander
|
||
아키텍처 : x86_64
|
||
URL : https://midnight-commander.org/
|
||
라이선스 : GPL
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : e2fsprogs glib2 gpm libssh2 slang which
|
||
선택 의존성 : aspell: spelling corrections
|
||
cabextract: ucab extfs
|
||
cdparanoia: audio extfs [설치함]
|
||
cdrkit: iso9660 extfs [설치함]
|
||
cvs: CVS support
|
||
gawk: hp48+ extfs [설치함]
|
||
mtools: a+ extfs [설치함]
|
||
p7zip: support for 7zip archives
|
||
perl: needed by several extfs scripts [설치함]
|
||
python: to access uc1541 or s3 storage [설치함]
|
||
python-boto: s3+ extfs
|
||
python-pytz: s3+ extfs [설치함]
|
||
samba: VFS support
|
||
unace: uace extfs
|
||
unarj: uarj extfs
|
||
unrar: urar extfs
|
||
unzip: open zip archives [설치함]
|
||
zip: uzip extfs [설치함]
|
||
다음이 요구 : 없음
|
||
다음의 선택 의존성 : 없음
|
||
다음과 충돌 : 없음
|
||
다음을 대체 : 없음
|
||
설치된 크기 : 7.07 MiB
|
||
꾸러미 만든이 : schuay <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
설치 날짜 : 없음
|
||
설치 이유 : 명시적으로 설치했습니다
|
||
설치 스크립트 : 아니요
|
||
유효검사자 : 서명
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
시스템에 설치된 패키지에 대한 일반적인 정보를 확인합니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Qii mc
|
||
이름 : mc
|
||
버전 : 4.8.27-1
|
||
설명 : A file manager that emulates Norton Commander
|
||
아키텍처 : x86_64
|
||
URL : https://midnight-commander.org/
|
||
라이선스 : GPL
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : e2fsprogs glib2 gpm libssh2 slang which
|
||
선택 의존성 : aspell: spelling corrections
|
||
cabextract: ucab extfs
|
||
cdparanoia: audio extfs [설치함]
|
||
cdrkit: iso9660 extfs [설치함]
|
||
cvs: CVS support
|
||
gawk: hp48+ extfs [설치함]
|
||
mtools: a+ extfs [설치함]
|
||
p7zip: support for 7zip archives
|
||
perl: needed by several extfs scripts [설치함]
|
||
python: to access uc1541 or s3 storage [설치함]
|
||
python-boto: s3+ extfs
|
||
python-pytz: s3+ extfs [설치함]
|
||
samba: VFS support
|
||
unace: uace extfs
|
||
unarj: uarj extfs
|
||
unrar: urar extfs
|
||
unzip: open zip archives [설치함]
|
||
zip: uzip extfs [설치함]
|
||
다음이 요구 : 없음
|
||
다음의 선택 의존성 : 없음
|
||
다음과 충돌 : 없음
|
||
다음을 대체 : 없음
|
||
설치된 크기 : 7.07 MiB
|
||
꾸러미 만든이 : schuay <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
설치 날짜 : 없음
|
||
설치 이유 : 명시적으로 설치했습니다
|
||
설치 스크립트 : 아니요
|
||
유효검사자 : 서명
|
||
백업 파일들 :
|
||
UNMODIFIED /etc/mc/edit.indent.rc
|
||
UNMODIFIED /etc/mc/filehighlight.ini
|
||
UNMODIFIED /etc/mc/mc.ext
|
||
UNMODIFIED /etc/mc/mc.keymap
|
||
UNMODIFIED /etc/mc/mc.menu
|
||
UNMODIFIED /etc/mc/mcedit.menu
|
||
UNMODIFIED /etc/mc/sfs.ini
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-i 옵션을 두번 사용하면 위와 같이 PKGBUILD 파일에서 백업을 요구한 구성 파일과 해당 파일들의 수정 여부를 확인할 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qii vlc
|
||
이름 : vlc
|
||
버전 : 3.0.16-3
|
||
설명 : Multi-platform MPEG, VCD/DVD, and DivX player
|
||
아키텍처 : x86_64
|
||
URL : https://www.videolan.org/vlc/
|
||
라이선스 : LGPL2.1 GPL2
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : a52dec libdvbpsi libxpm libdca libproxy lua52 libidn
|
||
libmatroska taglib libmpcdec ffmpeg faad2 libmad
|
||
libmpeg2 xcb-util-keysyms libtar libxinerama libsecret
|
||
libupnp libixml.so=11-64 libupnp.so=17-64 libarchive
|
||
qt5-base qt5-x11extras qt5-svg freetype2 fribidi
|
||
harfbuzz fontconfig libxml2 gnutls libplacebo
|
||
wayland-protocols
|
||
선택 의존성 : avahi: service discovery using bonjour protocol [설치함]
|
||
aom: AOM AV1 codec [설치함]
|
||
gst-plugins-base-libs: for libgst plugins [설치함]
|
||
dav1d: dav1d AV1 decoder [설치함]
|
||
libdvdcss: decoding encrypted DVDs
|
||
libavc1394: devices using the 1394ta AV/C [설치함]
|
||
libdc1394: IEEE 1394 access plugin [설치함]
|
||
kwallet: kwallet keystore
|
||
libva-vdpau-driver: vdpau backend nvidia
|
||
libva-intel-driver: video backend intel
|
||
libbluray: Blu-Ray video input [설치함]
|
||
flac: Free Lossless Audio Codec plugin [설치함]
|
||
twolame: TwoLAME mpeg2 encoder plugin [설치함]
|
||
libgme: Game Music Emu plugin [설치함]
|
||
vcdimager: navigate VCD with libvcdinfo
|
||
libmtp: MTP devices discovery [설치함]
|
||
systemd-libs: udev services discovery [설치함]
|
||
smbclient: SMB access plugin [설치함]
|
||
libcdio: audio CD playback [설치함]
|
||
gnu-free-fonts: subtitle font [설치함]
|
||
ttf-dejavu: subtitle font
|
||
libssh2: sftp access [설치함]
|
||
libnfs: NFS access [설치함]
|
||
mpg123: mpg123 codec [설치함]
|
||
protobuf: chromecast streaming [설치함]
|
||
libmicrodns: mDNS services discovery (chromecast etc)
|
||
[설치함]
|
||
lua52-socket: http interface
|
||
libdvdread: DVD input module [설치함]
|
||
libdvdnav: DVD with navigation input module [설치함]
|
||
libogg: Ogg and OggSpots codec [설치함]
|
||
libshout: shoutcast/icecast output plugin [설치함]
|
||
libmodplug: MOD output plugin [설치함]
|
||
libvpx: VP8 and VP9 codec [설치함]
|
||
libvorbis: Vorbis decoder/encoder [설치함]
|
||
speex: Speex codec [설치함]
|
||
opus: opus codec [설치함]
|
||
libtheora: theora codec [설치함]
|
||
libpng: PNG support [설치함]
|
||
libjpeg-turbo: JPEG support [설치함]
|
||
librsvg: SVG plugin [설치함]
|
||
x264: H264 encoding [설치함]
|
||
x265: HEVC/H.265 encoder [설치함]
|
||
zvbi: VBI/Teletext/webcam/v4l2 capture/decoding [설치함]
|
||
libass: Subtitle support [설치함]
|
||
libkate: Kate codec [설치함]
|
||
libtiger: Tiger rendering for Kate streams
|
||
sdl_image: SDL image support
|
||
srt: SRT input/output plugin [설치함]
|
||
aalib: ASCII art video output [설치함]
|
||
libcaca: colored ASCII art video output [설치함]
|
||
libpulse: PulseAudio audio output [설치함]
|
||
alsa-lib: ALSA audio output [설치함]
|
||
jack: jack audio server [설치함]
|
||
libsamplerate: audio Resampler [설치함]
|
||
libsoxr: SoX audio Resampler [설치함]
|
||
chromaprint: Chromaprint audio fingerprinter [설치함]
|
||
lirc: lirc control
|
||
libgoom2: Goom visualization
|
||
projectm: ProjectM visualisation
|
||
ncurses: ncurses interface [설치함]
|
||
libnotify: notification plugin [설치함]
|
||
gtk3: notification plugin [설치함]
|
||
aribb24: aribsub support
|
||
aribb25: aribcam support
|
||
pcsclite: aribcam support [설치함]
|
||
다음이 요구 : 없음
|
||
다음의 선택 의존성 : 없음
|
||
다음과 충돌 : vlc-plugin
|
||
다음을 대체 : vlc-plugin
|
||
설치된 크기 : 59.77 MiB
|
||
꾸러미 만든이 : Antonio Rojas <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
설치 날짜 : 없음
|
||
설치 이유 : 명시적으로 설치했습니다
|
||
설치 스크립트 : 아니요
|
||
유효검사자 : 서명
|
||
백업 파일들 :
|
||
(없음)
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위는 또다른 예입니다.
|
||
|
||
### 설치된 패키지의 설치 디렉터리 및 파일 출력
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Ql tree
|
||
tree /usr/
|
||
tree /usr/bin/
|
||
tree /usr/bin/tree
|
||
tree /usr/share/
|
||
tree /usr/share/man/
|
||
tree /usr/share/man/man1/
|
||
tree /usr/share/man/man1/tree.1.gz
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
위와 같이 패키지별 설치 디렉터리와 파일의 경로를 확인할 수 있습니다.
|
||
|
||
### 패키지로 설치된 파일의 개수 확인
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -Qk mc
|
||
mc: 총 파일 갯수 456개, 빠진 파일 갯수 0개
|
||
[study@study-virtualbox ~]$
|
||
|
||
[study@study-virtualbox ~]$ sudo pacman -Qkk mc
|
||
mc: 총 파일 갯수 456개, 대체한 파일 0개
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
\-k 옵션을 한 번만 쓰면 해당 패키지의 총 개수와 설치에 빠진 파일 개수가 출력됩니다.
|
||
|
||
\-k 옵션을 두 번 쓰면 해당 패키지의 총 개수와 대체한 파일 개수가 출력됩니다.
|
||
|
||
### 설치된 파일이 어떤 패키지에 포함되어 있는지 확인
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qo /usr/bin/tree
|
||
/usr/bin/tree는 tree 1.8.0-2가 소유했습니다
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
시스템 안에 존재하는 패키지 설치 파일이 어떤 패키지에 포함되어 있는지 출력합니다.
|
||
|
||
\-F 옵션이 저장소를 기준으로 검색한다면 -Qo 옵션은 설치된 패키지를 기준으로 검색합니다.
|
||
|
||
### 더이상 불필요한 종속 패키지 나열
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qdt
|
||
libopenaptx 0.2.0-1
|
||
python-isort 5.9.3-1
|
||
python-mccabe 0.6.1-9
|
||
rust 1:1.54.0-1
|
||
vulkan-headers 1:1.2.188-1
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
더이상 쓰이지 않는 종속 패키지를 나열합니다.
|
||
|
||
### 명시적으로 설치된 패키지 목록 나열
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qe
|
||
accerciser 3.38.0-2
|
||
autoconf 2.71-1
|
||
automake 1.16.4-1
|
||
baobab 40.0-1
|
||
base 2-2
|
||
bash-completion 2.11-2
|
||
binutils 2.36.1-3
|
||
|
||
- 생략 -
|
||
|
||
tree 1.8.0-2
|
||
vim 8.2.2891-1
|
||
vino 3.22.0+74+g7a95e10-1
|
||
vlc 3.0.16-3
|
||
which 2.21-5
|
||
xdg-user-dirs-gtk 0.10+9+g5b7efc6-3
|
||
yelp 40.3-1
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
사용자가 직접 명시적으로 설치한 패키지들만 나열합니다.
|
||
|
||
### 비종속성 명시 설치 패키지 나열
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qet
|
||
accerciser 3.38.0-2
|
||
baobab 40.0-1
|
||
base 2-2
|
||
bison 3.7.6-1
|
||
dconf-editor 3.38.3-1
|
||
|
||
- 생략 -
|
||
|
||
tree 1.8.0-2
|
||
vim 8.2.2891-1
|
||
vino 3.22.0+74+g7a95e10-1
|
||
vlc 3.0.16-3
|
||
xdg-user-dirs-gtk 0.10+9+g5b7efc6-3
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
사용자가 직접 명시적으로 설치하고 다른 패키지에게 종속성으로 사용되지 않는 모든 패키지를 나열합니다.
|
||
|
||
### 상호 의존 관계 패키지 목록 나열
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qd
|
||
a52dec 0.7.4-11
|
||
aalib 1.4rc5-14
|
||
accountsservice 0.6.55-3
|
||
acl 2.3.1-1
|
||
adobe-source-code-pro-fonts 2.038ro+1.058it+1.018var-1
|
||
adwaita-icon-theme 40.1.1-1
|
||
alsa-card-profiles 1:0.3.34-1
|
||
|
||
- 생략 -
|
||
|
||
zip 3.0-9
|
||
zita-alsa-pcmi 0.3.2-3
|
||
zita-resampler 1.8.0-1
|
||
zlib 1:1.2.11-4
|
||
zstd 1.5.0-1
|
||
zvbi 0.2.35-4
|
||
zxing-cpp 1.2.0-1
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
의존성의 상호보완적인 목록은 위와 같이 보여질 수 있습니다.
|
||
|
||
## 기타 작업
|
||
|
||
### 다운로드 받은 패키지 캐시에 복사
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -U file:///path/to/package/package_name-version.pkg.tar.zst
|
||
```
|
||
|
||
활성화된 저장소가 아니라 시스템에 등록되지 않은 외 저장소 등에서 다운받은 패키지를 아치 캐시 디렉터리에 복사해 관리하는 명령입니다.
|
||
|
||
- [아치 계열 리눅스 패키지 관리자 Pacman 주요 사용법 1 – 패키지 동기화, 설치, 업그레이드, 삭제](https://weftnwarp.kr/site-it/?p=7557/)
|
||
|
||
지난 시간에 외부에서 다운받은 패키지를 설치하는 방법을 설명하기 위해 사용한 예시 파일을 토대로 설명하도록 하겠습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ cd Downloads
|
||
[study@study-virtualbox Downloads]$ ls
|
||
nimfsoft.asc tian-2021.08.11-1-x86_64.pkg.tar.zst
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
위의 tian 패키지(tian-2021.08.11-1-x86\_64.pkg.tar.zst)를 캐시 디렉터리에 복사해 보관하도록 하겠습니다.
|
||
|
||
```
|
||
[study@study-virtualbox Downloads]$ sudo pacman -U file:///home/study/Downloads/tian-2021.08.11-1-x86_64.pkg.tar.zst
|
||
:: 꾸러미 가져오는 중...
|
||
tian-2021.08.11-... 301.5 KiB 14.7 MiB/s 00:00 [######################] 100%
|
||
오류: 파일 'tian-2021.08.11-1-x86_64.pkg.tar.zst.sig'를 디스크에서 가져오는 데 실패 : Couldn't open file /home/study/Downloads/tian-2021.08.11-1-x86_64.pkg.tar.zst.sig
|
||
경고: 일부 파일을 가져오지 못했습니다.
|
||
[study@study-virtualbox Downloads]$
|
||
|
||
[study@study-virtualbox Downloads]$ sudo pacman -U file:///home/study/Downloads/tian-2021.08.11-1-x86_64.pkg.tar.zst
|
||
꾸러미 불러오는 중...
|
||
오류: '/var/cache/pacman/pkg/tian-2021.08.11-1-x86_64.pkg.tar.zst': 필요한 서명이 누락된 꾸러미
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
tian 패키지의 경우 서명 파일이 존재하지 않아 위와 같은 오류 메시지를 출력합니다.
|
||
|
||
```
|
||
[study@study-virtualbox Downloads]$ ls /var/cache/pacman/pkg | grep tian
|
||
tian-2021.08.11-1-x86_64.pkg.tar.zst
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
서명 파일이 없을 뿐 패키지 파일 자체는 존재함을 알 수 있습니다.
|
||
|
||
이번엔 정상적으로 패키지 파일과 서명 파일 모두 다운받았다고 가정해봅시다.
|
||
|
||
여기서는 캐시 디렉터리에 있는 wget 패키지와 그 서명 파일을 Downloads 파일에 복사하고 기존 캐시 디렉터리를 완전히 비운다음 복사한 wget 패키지를 다시 캐시 디렉터리에 복사해보도록 하겠습니다.
|
||
|
||
```
|
||
[study@study-virtualbox pkg]$ ls | grep wget
|
||
wget-1.21.1-1-x86_64.pkg.tar.zst
|
||
wget-1.21.1-1-x86_64.pkg.tar.zst.sig
|
||
[study@study-virtualbox pkg]$
|
||
```
|
||
|
||
pacman을 이용해 -Sw옵션으로 wget 패키지를 다운로드받거나 -S 옵션으로 설치 작업을 수행한 후 캐시 디렉터리를 확인해보면 위와 같이 wget 패키지가 들어가 있음을 알 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox pkg]$ sudo cp wget-1.21.1-1-x86_64.pkg.tar.zst* ~/Downloads/
|
||
[sudo] study 암호:
|
||
[study@study-virtualbox pkg]$
|
||
```
|
||
|
||
위와 같이 wget 패키지를 ~/Downloads/ 디렉터리에 복사합니다.
|
||
|
||
```
|
||
[study@study-virtualbox pkg]$ sudo pacman -Scc
|
||
|
||
캐시 디렉터리: /var/cache/pacman/pkg/
|
||
:: 캐시에서 모든 파일을 제거하시겠습니까? [y/N] y
|
||
캐시에서 모든 파일 제거 중...
|
||
|
||
데이터베이스 디렉터리: /var/lib/pacman/
|
||
:: 사용하지 않는 저장소를 제거하시겠습니까? [Y/n]
|
||
사용하지 않는 동기화 저장소 제거 중...
|
||
[study@study-virtualbox pkg]$
|
||
```
|
||
|
||
그후 위처럼 캐시 디렉터리를 모두 비우도록 합시다.
|
||
|
||
```
|
||
[study@study-virtualbox pkg]$ ls -a
|
||
. ..
|
||
[study@study-virtualbox pkg]$
|
||
```
|
||
|
||
이제 캐시 디렉터리를 확인해보면 그 어떤 패키지 파일도 존재하지 않음을 확인할 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox pkg]$ cd ~/Downloads
|
||
[study@study-virtualbox Downloads]$ ls
|
||
nimfsoft.asc wget-1.21.1-1-x86_64.pkg.tar.zst
|
||
tian-2021.08.11-1-x86_64.pkg.tar.zst wget-1.21.1-1-x86_64.pkg.tar.zst.sig
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
~/Downloads/ 디렉터리에는 wget 패키지가 잘 보관되어 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox Downloads]$ sudo pacman -U file:///home/study/Downloads/wget-1.21.1-1-x86_64.pkg.tar.zst
|
||
:: 꾸러미 가져오는 중...
|
||
wget-1.21.1-1-x86_64 740.9 KiB 724 MiB/s 00:00 [######################] 100%
|
||
꾸러미 불러오는 중...
|
||
경고: wget-1.21.1-1는 최신 버전입니다. -- 재설치
|
||
의존성 해결 중...
|
||
꾸러미 충돌을 찾는 중...
|
||
|
||
꾸러미 (1) wget-1.21.1-1
|
||
|
||
총 설치 크기: 2.99 MiB
|
||
알짜 업그레이드 크기: 0.00 MiB
|
||
|
||
:: 설치를 진행하시겠습니까? [Y/n] n
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
이제 ‘$ sudo pacman -U file://패키지 파일 경로(/로 시작)’를 실행해줍니다.
|
||
|
||
그러면 위처럼 패키지 설치 작업이 진행됩니다.
|
||
|
||
우리는 패키지 설치 작업이 아니라 캐시 디렉터리에 패키지 복제 작업만 하고자 하는 것이므로 설치 진행 여부 질문에서 n을 입력하고 엔터키를 눌러줍니다.
|
||
|
||
```
|
||
[study@study-virtualbox Downloads]$ ls /var/cache/pacman/pkg
|
||
wget-1.21.1-1-x86_64.pkg.tar.zst wget-1.21.1-1-x86_64.pkg.tar.zst.sig
|
||
[study@study-virtualbox Downloads]$
|
||
```
|
||
|
||
캐시 디렉터리를 다시 확인해보면 wget 패키지가 잘 복사된 것을 확인할 수 있습니다.
|
||
|
||
### 패키지 설치 이유(설치 방식) 변경
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qi tree
|
||
이름 : tree
|
||
버전 : 1.8.0-2
|
||
설명 : A directory listing program displaying a depth indented
|
||
list of files
|
||
아키텍처 : x86_64
|
||
URL : http://mama.indstate.edu/users/ice/tree/
|
||
라이선스 : GPL
|
||
모음들 : 없음
|
||
다음을 제공 : 없음
|
||
다음에 의존 : glibc
|
||
선택 의존성 : 없음
|
||
다음이 요구 : 없음
|
||
다음의 선택 의존성 : 없음
|
||
다음과 충돌 : 없음
|
||
다음을 대체 : 없음
|
||
설치된 크기 : 92.44 KiB
|
||
꾸러미 만든이 : Jelle van der Waa <*****@*****.***>
|
||
빌드 날짜 : 없음
|
||
설치 날짜 : 없음
|
||
설치 이유 : 명시적으로 설치했습니다
|
||
설치 스크립트 : 아니요
|
||
유효검사자 : 서명
|
||
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
pacman으로 패키지를 지정하여 설치한 후 설치 패키지 정보를 질의하면 위와 같이 출력됩니다.
|
||
|
||
이때 설치 이유 항목을 보면 ‘명시적으로 설치했습니다’라고 표시되는 것을 볼 수 있습니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qi tree | grep '설치 이유'
|
||
설치 이유 : 명시적으로 설치했습니다
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
설치 이유만 보고 싶으면 위처럼 명령을 실행하시면 됩니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ sudo pacman -D --asdeps tree
|
||
tree: 설치 이유를 '의존성 요소로 설치'로 설정했습니다
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
어찌되었든 명시적으로 설치했던 패키지를 종속 패키지로 설치한 것으로 설정하려면 위처럼 실행하시면 됩니다.
|
||
|
||
```
|
||
[study@study-virtualbox ~]$ pacman -Qi tree | grep '설치 이유'
|
||
설치 이유 : 다른 꾸러미의 의존 요소로 설치했습니다
|
||
[study@study-virtualbox ~]$
|
||
```
|
||
|
||
$ pacman -Qi 명령ㅇㄹ 위처럼 실행하면 설치 이유가 위처럼 바뀐 것을 확인할 수 있습니다.
|
||
|
||
반대로 종속 패키지로 설치된 패키지를 사용자가 명시적으로 직접 지정 설치한 것으로 설정하려면 –asexplicit 옵션을 사용하시면 됩니다.
|
||
|
||
출처: [https://wnw1005.tistory.com/623](https://wnw1005.tistory.com/623) \[씨실과 날실 – IT\]
|
||
|
||
잘못된 정보를 제공하지 않기 위해 노력하지만, 시간이 지나 현재 정보와 어긋나거나, 제가 참고한 출처에서 잘못된 정보를 기재하는 경우도 있을 수 있으며, 또는 환경에 따라 다르게 적용되는 등의 이유로 해당 정보에 문제가 있을 수 있습니다.
|
||
따라서 **포스트 내의 정보는 그 무결성을 보장하지 않습니다.**
|
||
그러므로 포스트에 제공된 정보는 참고용으로만 활용하시기 바랍니다.
|
||
혹시 잘못된 정보를 발견하시게 되면 댓글로 남겨 주시기 바랍니다. 확인 후 빠른 시일 내에 수정, 보완하도록 하겠습니다.
|
||
|
||
[씨실과 날실 - IT](https://weftnwarp.kr/site-it) 블로그를 방문해주셔 감사합니다.
|
||
정보가 유용하셨다면 [클릭](https://weftnwarp.kr/site-it/archives/%EC%95%84%EC%B9%98-%EA%B3%84%EC%97%B4-%EB%A6%AC%EB%88%85%EC%8A%A4-%ED%8C%A8%ED%82%A4%EC%A7%80-%EA%B4%80%EB%A6%AC%EC%9E%90-pacman-%EC%A3%BC%EC%9A%94-%EC%82%AC%EC%9A%A9%EB%B2%95-2-%EC%BA%90%EC%8B%9C/#) 링크를 눌러 복사한 쇼트링크를 이용해 공유 부탁드립니다.
|
||
또한, 부족한 부분이 있다면 댓글로 의견을 남겨 주시면 감사하겠습니다. |