[Linux]ArchLinux(Manjaro)でのソフトウェアのインストール(コマンドライン編)

アイキャッチ画像Manjaro

ArchLinux系のパッケージマネージャー

ArchLinuxの場合、公式リポジトリAUR(Arch User Repository)の2つのソフトウエアリポジトリ(PCにインストールするソフトウエアを置いておくストレージ)があります。
公式リポジトリには、重要で人気のあるソフトウェアパッケージがあり、pacmanというツールを使ってインストールします。
一方、AURはコミュニティによって運営されているArchユーザーのためのリポジトリで、人気があるパッケージは公式リポジトリのcommunityリポジトリに取り込まれるようなっています。
また、AURにはパッケージのビルド方法が書かれたファイルが置いてあり、ユーザー自身でソースをダウンロードし、ビルドしてパッケージを作る必要があります。
といっても難しいことはありません。AURヘルパーというツールを使えば、パッケージソースのダウンロード、ビルド、インストールまでコマンド1つで済んでしまいます。

ArchLinux系のディストリビューションであるManjaroには、GUIのパッケージマネージャーが標準で提供されています。
「コマンドラインは使いたくない!」という方はこちらの記事をおススメします。

pacmanの使い方

pacmanは公式リポジトリ用のパッケージマネージャーです。

アップデート

  • 全インストール済みパッケージのアップデート
    $ sudo pacman -Syu

ArchLinuxはローリングリリースなので、一部のソフトウエアのみのアップデートは推奨されていません。依存関係が崩れる場合があるので、一部のソフトウェアのみのアップデートはやめましょう。

$ sudo pacman -Syu
:: パッケージデータベースの同期中...
 core                                                          168.9 KiB   174 KiB/s 00:01 [####################################################] 100%
 extra                                                        1901.3 KiB  1444 KiB/s 00:01 [####################################################] 100%
 community                                                       7.0 MiB  4.54 MiB/s 00:02 [####################################################] 100%
 multilib                                                      174.0 KiB  2.33 MiB/s 00:00 [####################################################] 100%
:: システム全体の更新を開始...
依存関係を解決しています...
衝突するパッケージがないか確認しています...

パッケージ (64) btrfs-progs-5.16.1-1  ca-certificates-mozilla-3.75-1  clang-13.0.1-1  compiler-rt-13.0.1-1  device-mapper-2.03.15-1  elfutils-0.186-4
                fftw-3.3.10-2  findutils-4.9.0-1  firefox-97.0-1  fontconfig-2:2.13.96-1  gdbm-1.23-1  ghostscript-9.55.0-4  gpgme-1.17.0-1
                harfbuzz-3.3.2-1  harfbuzz-icu-3.3.2-1  hwdata-0.356-1  imagemagick-7.1.0.23-1  imlib2-1.8.0-1  inkscape-1.1.2-1  jxrlib-0.2.4-1
                lib32-libelf-0.186-3  lib32-llvm-libs-13.0.1-1  libcap-2.63-2  libcap-ng-0.8.2-7  libelf-0.186-4  libical-3.0.14-1  libluv-1.43.0_0-1
                libnsl-2.0.0-2  libpcap-1.10.1-2  libreoffice-fresh-7.3.0-4  libusb-1.0.25-2  libxkbcommon-1.4.0-1  libxkbcommon-x11-1.4.0-1
                linux510-5.10.98-1  linux510-headers-5.10.98-1  llvm-13.0.1-1  llvm-libs-13.0.1-1  luajit-2.1.0.beta3.r384.g1d7b5029-1
                lvm2-2.03.15-1  man-db-2.10.0-1  manjaro-pulse-20220217-2  manjaro-xfce-minimal-settings-20220204-2  mesa-demos-8.4.0-7
                ncurses-6.3-2  neovim-0.6.1-2  npm-8.4.1-1  nss-3.75-1  papirus-icon-theme-20220204-1  perl-http-message-6.36-1
                python-numpy-1.22.2-1  qt5-base-5.15.2+kde+r297-1.1  qt5ct-1.5-2  shiboken6-6.2.3-2  systemd-250.3-3  systemd-libs-250.3-3
                systemd-sysvcompat-250.3-3  thunderbird-91.6.1-0.1  thunderbird-i18n-ja-91.6.1-1  upower-0.99.14-1  webkit2gtk-2.34.5-1
                xkeyboard-config-2.35-1  xorg-server-21.1.3-2  xorg-server-common-21.1.3-2  zensu-0.3-5

合計ダウンロード容量:         658.60 MiB
合計インストール容量:        2464.27 MiB
最終的なアップグレード容量:   -18.19 MiB

:: インストールを行いますか? [Y/n] Y
:: パッケージを取得します...
 libreoffice-fresh-7.3.0-4-x86_64                              138.0 MiB  10.4 MiB/s 00:13 [####################################################] 100%
 linux510-5.10.98-1-x86_64                                      74.0 MiB  11.1 MiB/s 00:07 [####################################################] 100%
 thunderbird-91.6.1-0.1-x86_64                                  63.1 MiB  11.7 MiB/s 00:05 [####################################################] 100%
 firefox-97.0-1-x86_64                                          62.0 MiB  3.11 MiB/s 00:20 [####################################################] 100%
 llvm-13.0.1-1-x86_64                                           55.9 MiB  1539 KiB/s 00:37 [####################################################] 100%
 clang-13.0.1-1-x86_64                                          34.6 MiB  2.98 MiB/s 00:12 [####################################################] 100%
 lib32-llvm-libs-13.0.1-1-x86_64                                28.9 MiB  4.01 MiB/s 00:07 [####################################################] 100%
 linux510-headers-5.10.98-1-x86_64                              28.5 MiB  3.01 MiB/s 00:09 [####################################################] 100%
 llvm-libs-13.0.1-1-x86_64                                      25.8 MiB  1948 KiB/s 00:14 [####################################################] 100%
 webkit2gtk-2.34.5-1-x86_64                                     23.4 MiB  1683 KiB/s 00:14 [####################################################] 100%
 papirus-icon-theme-20220204-1-any                              21.6 MiB  2.88 MiB/s 00:08 [####################################################] 100%
 inkscape-1.1.2-1-x86_64                                        18.1 MiB  3.69 MiB/s 00:05 [####################################################] 100%
 qt5-base-5.15.2+kde+r297-1.1-x86_64                            17.4 MiB  3.35 MiB/s 00:05 [####################################################] 100%
 ghostscript-9.55.0-4-x86_64                                    16.7 MiB  4.50 MiB/s 00:04 [####################################################] 100%
 systemd-250.3-3-x86_64                                          9.0 MiB  7.11 MiB/s 00:01 [####################################################] 100%
 neovim-0.6.1-2-x86_64                                           5.6 MiB  7.46 MiB/s 00:01 [####################################################] 100%
 python-numpy-1.22.2-1-x86_64                                    5.5 MiB  8.51 MiB/s 00:01 [####################################################] 100%
 fftw-3.3.10-2-x86_64                                            2.9 MiB  7.85 MiB/s 00:00 [####################################################] 100%
 compiler-rt-13.0.1-1-x86_64                                     2.9 MiB  6.92 MiB/s 00:00 [####################################################] 100%
 imagemagick-7.1.0.23-1-x86_64                                   2.6 MiB  6.84 MiB/s 00:00 [####################################################] 100%
 lvm2-2.03.15-1-x86_64                                        1848.4 KiB  5.59 MiB/s 00:00 [####################################################] 100%
 xorg-server-21.1.3-2-x86_64                                  1753.9 KiB  5.10 MiB/s 00:00 [####################################################] 100%
 nss-3.75-1-x86_64                                            1554.0 KiB  4.85 MiB/s 00:00 [####################################################] 100%
 mesa-demos-8.4.0-7-x86_64                                    1545.9 KiB  4.66 MiB/s 00:00 [####################################################] 100%
 npm-8.4.1-1-any                                              1386.2 KiB  5.21 MiB/s 00:00 [####################################################] 100%
 ncurses-6.3-2-x86_64                                         1170.4 KiB  4.30 MiB/s 00:00 [####################################################] 100%
 man-db-2.10.0-1-x86_64                                       1099.6 KiB  4.75 MiB/s 00:00 [####################################################] 100%
 shiboken6-6.2.3-2-x86_64                                      967.8 KiB  4.50 MiB/s 00:00 [####################################################] 100%
 btrfs-progs-5.16.1-1-x86_64                                   947.2 KiB  3.81 MiB/s 00:00 [####################################################] 100%
 harfbuzz-3.3.2-1-x86_64                                       941.4 KiB  4.30 MiB/s 00:00 [####################################################] 100%
 xkeyboard-config-2.35-1-any                                   819.0 KiB  3.69 MiB/s 00:00 [####################################################] 100%
 systemd-libs-250.3-3-x86_64                                   790.8 KiB   659 KiB/s 00:01 [####################################################] 100%
 thunderbird-i18n-ja-91.6.1-1-x86_64                           670.3 KiB  2013 KiB/s 00:00 [####################################################] 100%
 libical-3.0.14-1-x86_64                                       619.3 KiB  2.46 MiB/s 00:00 [####################################################] 100%
 elfutils-0.186-4-x86_64                                       569.9 KiB  2.65 MiB/s 00:00 [####################################################] 100%
 lib32-libelf-0.186-3-x86_64                                   546.0 KiB  3.21 MiB/s 00:00 [####################################################] 100%
 imlib2-1.8.0-1-x86_64                                         539.9 KiB  2.82 MiB/s 00:00 [####################################################] 100%
 libelf-0.186-4-x86_64                                         532.4 KiB  2.48 MiB/s 00:00 [####################################################] 100%
 hwdata-0.356-1-any                                            471.2 KiB  3.38 MiB/s 00:00 [####################################################] 100%
 findutils-4.9.0-1-x86_64                                      449.8 KiB  3.07 MiB/s 00:00 [####################################################] 100%
 gpgme-1.17.0-1-x86_64                                         441.7 KiB  3.24 MiB/s 00:00 [####################################################] 100%
 fontconfig-2:2.13.96-1-x86_64                                 363.0 KiB  3.77 MiB/s 00:00 [####################################################] 100%
 ca-certificates-mozilla-3.75-1-x86_64                         343.9 KiB  2.45 MiB/s 00:00 [####################################################] 100%
 luajit-2.1.0.beta3.r384.g1d7b5029-1-x86_64                    320.1 KiB  2.04 MiB/s 00:00 [####################################################] 100%
 device-mapper-2.03.15-1-x86_64                                294.4 KiB  2.16 MiB/s 00:00 [####################################################] 100%
 libpcap-1.10.1-2-x86_64                                       276.7 KiB  1698 KiB/s 00:00 [####################################################] 100%
 gdbm-1.23-1-x86_64                                            265.8 KiB  2.22 MiB/s 00:00 [####################################################] 100%
 jxrlib-0.2.4-1-x86_64                                         222.2 KiB  2.11 MiB/s 00:00 [####################################################] 100%
 qt5ct-1.5-2-x86_64                                            214.7 KiB  2006 KiB/s 00:00 [####################################################] 100%
 libxkbcommon-1.4.0-1-x86_64                                   202.7 KiB  1794 KiB/s 00:00 [####################################################] 100%
 upower-0.99.14-1-x86_64                                       159.5 KiB  1772 KiB/s 00:00 [####################################################] 100%
 libcap-2.63-2-x86_64                                           83.1 KiB   462 KiB/s 00:00 [####################################################] 100%
 perl-http-message-6.36-1-any                                   75.6 KiB   630 KiB/s 00:00 [####################################################] 100%
 libusb-1.0.25-2-x86_64                                         69.2 KiB   647 KiB/s 00:00 [####################################################] 100%
 libluv-1.43.0_0-1-x86_64                                       55.1 KiB   689 KiB/s 00:00 [####################################################] 100%
 libcap-ng-0.8.2-7-x86_64                                       41.6 KiB   631 KiB/s 00:00 [####################################################] 100%
 xorg-server-common-21.1.3-2-x86_64                             31.8 KiB   383 KiB/s 00:00 [####################################################] 100%
 manjaro-xfce-minimal-settings-20220204-2-any                   30.2 KiB   392 KiB/s 00:00 [####################################################] 100%
 libxkbcommon-x11-1.4.0-1-x86_64                                22.3 KiB   333 KiB/s 00:00 [####################################################] 100%
 libnsl-2.0.0-2-x86_64                                          21.8 KiB   464 KiB/s 00:00 [####################################################] 100%
 zensu-0.3-5-any                                                21.1 KiB  25.0 KiB/s 00:01 [####################################################] 100%
 manjaro-pulse-20220217-2-any                                   19.9 KiB   149 KiB/s 00:00 [####################################################] 100%
 harfbuzz-icu-3.3.2-1-x86_64                                     7.8 KiB   180 KiB/s 00:00 [####################################################] 100%
 systemd-sysvcompat-250.3-3-x86_64                               6.3 KiB   137 KiB/s 00:00 [####################################################] 100%
 合計 (64/64)                                                  658.6 MiB  3.74 MiB/s 02:56 [####################################################] 100%
(64/64) キーリングのキーを確認                                                             [####################################################] 100%
(64/64) パッケージの整合性をチェック                                                       [####################################################] 100%
(64/64) パッケージファイルのロード                                                         [####################################################] 100%
(64/64) ファイルの衝突をチェック                                                           [####################################################] 100%
(64/64) 空き容量を確認                                                                     [####################################################] 100%
:: トランザクション前のフックを実行...
(1/5) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
(2/5) Removing linux initcpios...
(3/5) Remove DKMS modules
==> dkms remove --no-depmod rtl8821au/5.12.5.2 -k 5.10.96-1-MANJARO
==> depmod 5.10.96-1-MANJARO
(4/5) Remove Firefox Distribution Settings
(5/5) Remove Thunderbird Distribution Settings
:: パッケージの変更を処理しています...
( 1/64) 更新 ncurses                                                                       [####################################################] 100%
( 2/64) 更新 btrfs-progs                                                                   [####################################################] 100%
( 3/64) 更新 findutils                                                                     [####################################################] 100%
( 4/64) 更新 libcap-ng                                                                     [####################################################] 100%
( 5/64) 更新 libcap                                                                        [####################################################] 100%
( 6/64) 更新 systemd-libs                                                                  [####################################################] 100%
( 7/64) 更新 ca-certificates-mozilla                                                       [####################################################] 100%
( 8/64) 更新 llvm-libs                                                                     [####################################################] 100%
( 9/64) 更新 compiler-rt                                                                   [####################################################] 100%
(10/64) 更新 libelf                                                                        [####################################################] 100%
(11/64) 更新 elfutils                                                                      [####################################################] 100%
(12/64) 更新 clang                                                                         [####################################################] 100%
(13/64) 更新 device-mapper                                                                 [####################################################] 100%
(14/64) 更新 gdbm                                                                          [####################################################] 100%
(15/64) 更新 fftw                                                                          [####################################################] 100%
(16/64) 更新 nss                                                                           [####################################################] 100%
(17/64) 更新 harfbuzz                                                                      [####################################################] 100%
(18/64) 更新 fontconfig                                                                    [####################################################] 100%
Rebuilding fontconfig cache...
(19/64) 更新 hwdata                                                                        [####################################################] 100%
(20/64) 更新 libpcap                                                                       [####################################################] 100%
(21/64) 更新 systemd                                                                       [####################################################] 100%
(22/64) 更新 libusb                                                                        [####################################################] 100%
(23/64) 更新 xkeyboard-config                                                              [####################################################] 100%
(24/64) 更新 libxkbcommon                                                                  [####################################################] 100%
(25/64) 更新 firefox                                                                       [####################################################] 100%
(26/64) 更新 ghostscript                                                                   [####################################################] 100%
(27/64) 更新 gpgme                                                                         [####################################################] 100%
(28/64) 更新 harfbuzz-icu                                                                  [####################################################] 100%
(29/64) 更新 imagemagick                                                                   [####################################################] 100%
(30/64) 更新 imlib2                                                                        [####################################################] 100%
(31/64) 更新 libnsl                                                                        [####################################################] 100%
(32/64) 更新 inkscape                                                                      [####################################################] 100%
(33/64) 更新 jxrlib                                                                        [####################################################] 100%
(34/64) 更新 lib32-libelf                                                                  [####################################################] 100%
(35/64) 更新 lib32-llvm-libs                                                               [####################################################] 100%
(36/64) 更新 libical                                                                       [####################################################] 100%
(37/64) 更新 luajit                                                                        [####################################################] 100%
(38/64) 更新 libluv                                                                        [####################################################] 100%
(39/64) 更新 libreoffice-fresh                                                             [####################################################] 100%
(40/64) 更新 libxkbcommon-x11                                                              [####################################################] 100%
(41/64) 更新 linux510                                                                      [####################################################] 100%
(42/64) 更新 linux510-headers                                                              [####################################################] 100%
(43/64) 更新 llvm                                                                          [####################################################] 100%
(44/64) 更新 lvm2                                                                          [####################################################] 100%
(45/64) 更新 man-db                                                                        [####################################################] 100%
(46/64) 更新 manjaro-pulse                                                                 [####################################################] 100%
manjaro-pulse の新しい提案パッケージ
    pulseaudio-equalizer: Graphical equalizer
    pulseaudio-equalizer-ladspa: A 15-band equalizer
    pulseaudio-lirc: IR (lirc) support [インストール済み]
    pulseaudio-rtp: RTP and RAOP support [インストール済み]
    sof-firmware
(47/64) 更新 qt5-base                                                                      [####################################################] 100%
(48/64) 更新 qt5ct                                                                         [####################################################] 100%
(49/64) 更新 papirus-icon-theme                                                            [####################################################] 100%
(50/64) 更新 manjaro-xfce-minimal-settings                                                 [####################################################] 100%
(51/64) 更新 mesa-demos                                                                    [####################################################] 100%
(52/64) 更新 neovim                                                                        [####################################################] 100%
(53/64) 更新 npm                                                                           [####################################################] 100%
(54/64) 更新 perl-http-message                                                             [####################################################] 100%
(55/64) 更新 python-numpy                                                                  [####################################################] 100%
(56/64) 更新 shiboken6                                                                     [####################################################] 100%
(57/64) 更新 systemd-sysvcompat                                                            [####################################################] 100%
(58/64) 更新 thunderbird                                                                   [####################################################] 100%
(59/64) 更新 thunderbird-i18n-ja                                                           [####################################################] 100%
(60/64) 更新 upower                                                                        [####################################################] 100%
(61/64) 更新 webkit2gtk                                                                    [####################################################] 100%
(62/64) 更新 xorg-server-common                                                            [####################################################] 100%
(63/64) 更新 xorg-server                                                                   [####################################################] 100%
(64/64) 更新 zensu                                                                         [####################################################] 100%
zensu の新しい提案パッケージ
    kdialog: Option for displaying dialog window
    yad: Option for displaying dialog window
    zenity: Option for displaying dialog window
:: トランザクション後のフックを実行...
( 1/24) Creating system user accounts...
( 2/24) Updating journal message catalog...
( 3/24) Reloading system manager configuration...
( 4/24) Updating udev hardware database...
( 5/24) Applying kernel sysctl settings...
( 6/24) Creating temporary files...
( 7/24) Reloading device manager configuration...
( 8/24) Arming ConditionNeedsUpdate...
( 9/24) Updating the MIME type database...
(10/24) Updating fontconfig configuration...
(11/24) Rebuilding certificate stores...
(12/24) Updating module dependencies...
(13/24) Install DKMS modules
==> dkms install --no-depmod rtl8821au/5.12.5.2 -k 5.10.98-1-MANJARO
==> depmod 5.10.98-1-MANJARO
(14/24) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.98-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.98-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
(15/24) Updating Grub-Bootmenu
Generating grub configuration file ...
テーマを見つけました: /usr/share/grub/themes/manjaro/theme.txt
Linux イメージを見つけました: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
完了
(16/24) Reloading system bus configuration...
(17/24) Warn about old perl modules
(18/24) Copy Firefox Distribution Settings
(19/24) Updating fontconfig cache...
(20/24) Compiling GSettings XML schema files...
(21/24) Updating icon theme caches...
(22/24) Updating the info directory file...
(23/24) Copy Thunderbird Distribution Settings
(24/24) Updating the desktop file MIME type cache...
$

インストール

  • パッケージのインストール
    $ sudo pacman -S パッケージ名1 パッケージ名2 ...
  • パッケージグループのインストール
    $ sudo pacman -S パッケージグループ名

新しいパッケージをインストールする前には、sudo pacman -Syuを実行して、インストール済みパッケージ(ライブラリ等)を最新版にアップデートしておきましょう。

$ sudo pacman -S texlive-langjapanese texlive-most
:: 12 個のパッケージがグループ texlive-most に存在します:
:: リポジトリ extra
   1) texlive-bibtexextra  2) texlive-core  3) texlive-fontsextra  4) texlive-formatsextra  5) texlive-games  6) texlive-humanities
   7) texlive-latexextra  8) texlive-music  9) texlive-pictures  10) texlive-pstricks  11) texlive-publishers  12) texlive-science

選択して下さい (デフォルト=all): 
警告: texlive-core-2021.61403-1 は最新です -- 再インストール
依存関係を解決しています...
衝突するパッケージがないか確認しています...

パッケージ (14) perl-file-which-1.27-1  texlive-bibtexextra-2021.61406-1  texlive-core-2021.61403-1  texlive-fontsextra-2021.61408-1
                texlive-formatsextra-2021.57972-1  texlive-games-2021.60973-1  texlive-humanities-2021.60935-1  texlive-langjapanese-2021.61273-1
                texlive-latexextra-2021.61405-1  texlive-music-2021.60382-1  texlive-pictures-2021.61392-1  texlive-pstricks-2021.61407-1
                texlive-publishers-2021.61397-1  texlive-science-2021.61383-1

合計ダウンロード容量:         683.46 MiB
合計インストール容量:        2454.45 MiB
最終的なアップグレード容量:  2063.35 MiB

:: インストールを行いますか? [Y/n] Y
:: パッケージを取得します...
 texlive-fontsextra-2021.61408-1-any                           503.2 MiB  4.76 MiB/s 01:46 [####################################################] 100%
 texlive-core-2021.61403-1-any は最新です
 texlive-langjapanese-2021.61273-1-any                          82.6 MiB  2.56 MiB/s 00:32 [####################################################] 100%
 texlive-pstricks-2021.61407-1-any                              25.5 MiB  5.23 MiB/s 00:05 [####################################################] 100%
 texlive-music-2021.60382-1-any                                 22.3 MiB  4.31 MiB/s 00:05 [####################################################] 100%
 texlive-publishers-2021.61397-1-any                            19.5 MiB  4.64 MiB/s 00:04 [####################################################] 100%
 texlive-latexextra-2021.61405-1-any                            14.1 MiB  4.65 MiB/s 00:03 [####################################################] 100%
 texlive-pictures-2021.61392-1-any                               7.9 MiB  4.57 MiB/s 00:02 [####################################################] 100%
 texlive-science-2021.61383-1-any                                3.4 MiB  4.13 MiB/s 00:01 [####################################################] 100%
 texlive-bibtexextra-2021.61406-1-any                            3.3 MiB  3.64 MiB/s 00:01 [####################################################] 100%
 texlive-formatsextra-2021.57972-1-any                         672.8 KiB  2.78 MiB/s 00:00 [####################################################] 100%
 texlive-games-2021.60973-1-any                                587.1 KiB  2.73 MiB/s 00:00 [####################################################] 100%
 texlive-humanities-2021.60935-1-any                           323.8 KiB  1002 KiB/s 00:00 [####################################################] 100%
 perl-file-which-1.27-1-any                                     12.1 KiB   242 KiB/s 00:00 [####################################################] 100%
 合計 (14/14)                                                  683.5 MiB  4.25 MiB/s 02:41 [####################################################] 100%
(14/14) キーリングのキーを確認                                                             [####################################################] 100%
(14/14) パッケージの整合性をチェック                                                       [####################################################] 100%
(14/14) パッケージファイルのロード                                                         [####################################################] 100%
(14/14) ファイルの衝突をチェック                                                           [####################################################] 100%
(14/14) 空き容量を確認                                                                     [####################################################] 100%
:: トランザクション前のフックを実行...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: パッケージの変更を処理しています...
( 1/14) 再インストール texlive-core                                                        [####################################################] 100%
>>> updmap custom entries should go into /etc/texmf/web2c/updmap-local.cfg
>>> fmtutil custom entries should go into /etc/texmf/web2c/fmtutil-local.cnf
( 2/14) インストール texlive-langjapanese                                                  [####################################################] 100%
( 3/14) インストール texlive-bibtexextra                                                   [####################################################] 100%
( 4/14) インストール texlive-fontsextra                                                    [####################################################] 100%
( 5/14) インストール texlive-formatsextra                                                  [####################################################] 100%
( 6/14) インストール texlive-games                                                         [####################################################] 100%
( 7/14) インストール perl-file-which                                                       [####################################################] 100%
( 8/14) インストール texlive-latexextra                                                    [####################################################] 100%
texlive-latexextra の提案パッケージ
    python-pygments: for pygmentex
    texlive-genericextra: to use the calctab package [インストール済み]
    texlive-pictures: to use the package overpic [保留]
    java-environment: to use pdfannotextractor
( 9/14) インストール texlive-humanities                                                    [####################################################] 100%
texlive-humanities の提案パッケージ
    texlive-pictures: for package qtree [保留]
(10/14) インストール texlive-music                                                         [####################################################] 100%
texlive-music の提案パッケージ
    python: for scripts from the lilyglyphs packages [インストール済み]
    fontforge: for scripts from the lilyglyphs packages
(11/14) インストール texlive-pictures                                                      [####################################################] 100%
(12/14) インストール texlive-pstricks                                                      [####################################################] 100%
(13/14) インストール texlive-publishers                                                    [####################################################] 100%
(14/14) インストール texlive-science                                                       [####################################################] 100%
:: トランザクション後のフックを実行...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Warn about old perl modules
(3/6) Updating fontconfig cache...
(4/6) Updating TeXLive filename database...
(5/6) Updating TeXLive format files...
(6/6) Updating TeXLive font maps...
$

検索

  • パッケージの検索
    $ pacman -Ss 検索ワード1 検索ワード2 ...
$ pacman -Ss gvim
extra/gvim 8.2.4106-1
    Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)
$
  • インストール済みパッケージの検索
    $ pacman -Qs 検索ワード1 検索ワード2 ...
$ pacman -Qs kicad
local/kicad 6.0.1-2
    Electronic schematic and printed circuit board (PCB) design tools
local/kicad-library 6.0.1-1
    KiCad symbol, footprint and template libraries
local/kicad-library-3d 6.0.1-1
    KiCad 3D model libraries
$
  • パッケージの情報表示
    $ pacman -Si パッケージ名
$ pacman -Si gvim
リポジトリ             : extra
名前                   : gvim
バージョン             : 8.2.4106-1
説明                   : Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)
アーキテクチャ         : x86_64
URL                    : https://www.vim.org
ライセンス             : custom:vim
グループ               : なし
提供                   : vim=8.2.4106-1  xxd  vim-plugin-runtime
依存パッケージ         : vim-runtime=8.2.4106-1  gpm  libxt  gtk3  glibc  libgcrypt  pcre  zlib  libcanberra
提案パッケージ         : python: Python 3 language support
                         ruby: Ruby language support
                         lua: Lua language support
                         perl: Perl language support
                         tcl: Tcl language support
衝突パッケージ         : vim-minimal  vim
置換パッケージ         : gvim-python3
ダウンロード容量       : 2.18 MiB
インストール容量       : 4.89 MiB
パッケージ作成者       : Levente Polyak <anthraxx@archlinux.org>
ビルド日時             : 2022年01月16日 21時09分56秒
検証方法               : MD5 Sum  SHA-256 Sum  署名

$
  • インストール済みパッケージの情報表示
    $ pacman -Qi パッケージ名
$ pacman -Qi kicad
名前                   : kicad
バージョン             : 6.0.1-2
説明                   : Electronic schematic and printed circuit board (PCB) design tools
アーキテクチャ         : x86_64
URL                    : http://kicad.org/
ライセンス             : GPL
グループ               : なし
提供                   : なし
依存パッケージ         : boost-libs  curl  glew  glm  ngspice  opencascade  python  python-wxpython  wxgtk3
提案パッケージ         : kicad-library: for footprints, symbols and templates [インストール済み]
                         kicad-library-3d: for 3D models of components [インストール済み]
必要パッケージ         : なし
任意パッケージ         : なし
衝突パッケージ         : なし
置換パッケージ         : なし
インストール容量       : 186.66 MiB
パッケージ作成者       : George Rawlinson <grawlinson@archlinux.org>
ビルド日時             : 2022年01月16日 08時16分29秒
インストール日時       : 2022年01月26日 16時27分37秒
インストール方法       : 明示的にインストール
インストールスクリプト : No
検証方法               : 署名

$
  • インストール済みパッケージの依存関係表示
    $ pactree パッケージ名
$ pactree vi
vi
└─ncurses
  ├─glibc
  │ ├─linux-api-headers provides linux-api-headers>=4.10
  │ ├─tzdata
  │ └─filesystem
  │   └─iana-etc
  └─gcc-libs
    └─glibc provides glibc>=2.27
$
  • あるパッケージを必要としている全てのパッケージを表示
    $ pactree -r パッケージ名
$ pactree -r gcc
gcc
├─clang
│ └─shiboken6
│   └─pyside6
│     └─web-installer-url-handler
│       └─manjaro-hello
└─dkms
$

アンインストール

  • パッケージの削除
    $ sudo pacman -R パッケージ名
$ sudo pacman -R kicad-library
依存関係を確認しています...

パッケージ (1) kicad-library-6.0.1-1

合計削除容量:  242.22 MiB

:: 以上のパッケージを削除しますか? [Y/n] Y
:: パッケージの変更を処理しています...
(1/1) 削除 kicad-library                                                                   [####################################################] 100%
:: トランザクション後のフックを実行...
(1/1) Arming ConditionNeedsUpdate...
$
  • 削除したいパッケージと、そのパッケージだけが必要としている他のパッケージを一緒に削除
    $ sudo pacman -Rs パッケージ名
$ sudo pacman -Rs kicad
依存関係を確認しています...
:: git は任意で tk: gitk and git gui を必要とします
:: python は任意で tk: for tkinter を必要とします
:: python2 は任意で tk: for IDLE を必要とします

パッケージ (11) freeimage-3.18.0-12  gl2ps-1.4.2-2  glm-0.9.9.8-1  jxrlib-0.2.4-1  ngspice-36-1  opencascade-1:7.5.3-1  python-wxpython-1:4.0.7.2-3
                tbb-2021.5.0-1  tk-8.6.12-1  vtk-9.1.0-9  kicad-6.0.1-2

合計削除容量:  744.05 MiB

:: 以上のパッケージを削除しますか? [Y/n] Y
:: パッケージの変更を処理しています...
( 1/11) 削除 kicad                                                                         [####################################################] 100%
( 2/11) 削除 python-wxpython                                                               [####################################################] 100%
( 3/11) 削除 opencascade                                                                   [####################################################] 100%
( 4/11) 削除 vtk                                                                           [####################################################] 100%
( 5/11) 削除 tk                                                                            [####################################################] 100%
( 6/11) 削除 tbb                                                                           [####################################################] 100%
( 7/11) 削除 gl2ps                                                                         [####################################################] 100%
( 8/11) 削除 freeimage                                                                     [####################################################] 100%
( 9/11) 削除 jxrlib                                                                        [####################################################] 100%
(10/11) 削除 ngspice                                                                       [####################################################] 100%
(11/11) 削除 glm                                                                           [####################################################] 100%
:: トランザクション後のフックを実行...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating the MIME type database...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
$

キャッシュ削除

pacmanはダウンロードしたパッケージを/var/cache/pacman/pkg/に保存し、古いバージョンやアンインストールされたパッケージは自動では削除されません。
このため、定期的にこのフォルダを整理する必要があります。

  • パッケージキャッシュを3バージョンだけ残したキャッシュ削除
    $ paccache -r
$ paccache -r
==> Privilege escalation required

==> finished: 41 packages removed (disk space saved: 1.14 GiB)
$
  • アンインストールしたパッケージのキャッシュ削除
    $ paccache -ruk0
$ ls /var/cache/pacman/pkg/kicad*
/var/cache/pacman/pkg/kicad-5.1.10-2-x86_64.pkg.tar.zst          /var/cache/pacman/pkg/kicad-library-3d-6.0.1-1-any.pkg.tar.zst
/var/cache/pacman/pkg/kicad-6.0.0-2-x86_64.pkg.tar.zst           /var/cache/pacman/pkg/kicad-library-5.1.10-1-any.pkg.tar.zst
/var/cache/pacman/pkg/kicad-6.0.1-2-x86_64.pkg.tar.zst           /var/cache/pacman/pkg/kicad-library-6.0.0-2-any.pkg.tar.zst
/var/cache/pacman/pkg/kicad-library-3d-5.1.10-1-any.pkg.tar.zst  /var/cache/pacman/pkg/kicad-library-6.0.1-1-any.pkg.tar.zst
/var/cache/pacman/pkg/kicad-library-3d-6.0.0-2-any.pkg.tar.zst
$ 
$ paccache -ruk0
==> Privilege escalation required

==> finished: 25 packages removed (disk space saved: 1.34 GiB)
$ 
$ ls /var/cache/pacman/pkg/kicad*
ls: '/var/cache/pacman/pkg/kicad*' にアクセスできません: そのようなファイルやディレクトリはありません
$

pacman -Sccでもパッケージキャッシュを削除することができます。
しかし、すべてのキャッシュを削除してしまうため、推奨されていません。

AURヘルパー(yay)の使い方

AURヘルパーはたくさんありますが、一番メジャーなyayの使い方を紹介します。

yayは内部でpacmanを使っているため、公式リポジトリにあるパッケージも対象となります。

基本的な操作でのyayのコマンドラインオプションはpacmanと同じです。

情報表示

  • インストールしたパッケージ数や容量、パッケージサイズ上位10個などの情報表示
    $ yay -Ps
$ yay -Ps
==> Yay バージョン v11.1.1
===========================================
==> 全てのインストールされたパッケージ: 1150
==> Foreign installed packages: 9
==> 明示的にインストールしたパッケージ: 303
==> パッケージによって使用される合計容量: 17.1 GiB
===========================================
==> 最も巨大な10のパッケージ:
kicad-library-3d: 5.2 GiB
texlive-fontsextra: 1.3 GiB
linux-firmware: 431.1 MiB
texlive-langjapanese: 401.4 MiB
libreoffice-fresh: 399.6 MiB
texlive-core: 391.1 MiB
microsoft-edge-stable-bin: 378.3 MiB
llvm: 337.6 MiB
vtk: 315.6 MiB
visual-studio-code-bin: 274.9 MiB
===========================================
:: AUR を検索...
 -> 存在しない AUR パッケージ:  hardinfo  noto-sans-japanese  noto-serif-japanese
 -> 古いバージョンのフラグが立てられた AUR パッケージ:  microsoft-edge-stable-bin
$

アップデート

  • 全インストール済みパッケージのアップデート
    $ yay
$ yay
:: パッケージデータベースの同期中...
 core は最新です
 extra は最新です
 community は最新です
 multilib は最新です
:: システム全体の更新を開始...
 何も行うことがありません
:: データベースからアップデートを検索...
:: AUR からアップデートを検索...
 -> 存在しない AUR パッケージ:  hardinfo  noto-sans-japanese  noto-serif-japanese
 何もすることがありません
$

インストール

  • パッケージのインストール
    $ yay -S パッケージ名1 パッケージ名2 ...
$ yay -S microsoft-edge-stable-bin
:: 衝突を確認...
:: 内部衝突を確認...
[Aur:1]  microsoft-edge-stable-bin-97.0.1072.76-1

:: (1/1) Downloaded PKGBUILD: microsoft-edge-stable-bin
  1 microsoft-edge-stable-bin        (ビルドファイルが存在)
==> 差異を表示しますか?
==> [N]なし [A]全て [Ab]中止 [I]インストール済み [No]未インストール または (1 2 3, 1-3, ^4)
==> N
:: (1/1) SRCINFO を解析中: microsoft-edge-stable-bin
==> パッケージを作成: microsoft-edge-stable-bin 97.0.1072.76-1 (2022年02月10日 16時14分20秒)
==> ソースを取得...
  -> ダウンロード microsoft-edge-stable_97.0.1072.76-1_amd64.deb...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  114M  100  114M    0     0  6449k      0  0:00:18  0:00:18 --:--:-- 12.4M
  -> microsoft-edge-stable.sh を見つけました
  -> Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf を見つけました
==> source で sha256sums ファイルを検証...
    microsoft-edge-stable_97.0.1072.76-1_amd64.deb ... 成功
    microsoft-edge-stable.sh ... 成功
    Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf ... 成功
==> パッケージを作成: microsoft-edge-stable-bin 97.0.1072.76-1 (2022年02月10日 16時14分41秒)
==> ランタイムの依存関係を確認...
==> ビルドタイムの依存関係を確認...
==> ソースを取得...
  -> microsoft-edge-stable_97.0.1072.76-1_amd64.deb を見つけました
  -> microsoft-edge-stable.sh を見つけました
  -> Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf を見つけました
==> source で sha256sums ファイルを検証...
    microsoft-edge-stable_97.0.1072.76-1_amd64.deb ... 成功
    microsoft-edge-stable.sh ... 成功
    Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf ... 成功
==> 既存の $srcdir/ ディレクトリを削除...
==> ソースを展開...
  -> microsoft-edge-stable_97.0.1072.76-1_amd64.deb を bsdtar で展開
==> ソースの準備ができました。
==> パッケージを作成: microsoft-edge-stable-bin 97.0.1072.76-1 (2022年02月10日 16時14分46秒)
==> ランタイムの依存関係を確認...
==> ビルドタイムの依存関係を確認...
==> 警告: 既存の $srcdir/ ツリーを使用
==> fakeroot 環境を開始します...
==> package() を開始...
==> インストールを整理...
  -> libtool ファイルを削除...
  -> 不要なファイルを削除...
  -> スタティックライブラリファイルを削除しています...
==> パッケージの問題をチェック...
==> パッケージを作成 "microsoft-edge-stable-bin"...
  -> .PKGINFO ファイルを生成...
  -> .BUILDINFO ファイルを生成...
  -> .MTREE ファイルを生成...
  -> パッケージの圧縮...
==> fakeroot 環境を終了。
==> 作成完了: microsoft-edge-stable-bin 97.0.1072.76-1 (2022年02月10日 16時15分22秒)
==> 清掃...
[sudo] xxxx のパスワード:
パッケージをロード...
依存関係を解決しています...
衝突するパッケージがないか確認しています...

パッケージ (1) microsoft-edge-stable-bin-97.0.1072.76-1

合計インストール容量:  378.26 MiB

:: インストールを行いますか? [Y/n] 
(1/1) キーリングのキーを確認                                                               [####################################################] 100%
(1/1) パッケージの整合性をチェック                                                         [####################################################] 100%
(1/1) パッケージファイルのロード                                                           [####################################################] 100%
(1/1) ファイルの衝突をチェック                                                             [####################################################] 100%
(1/1) 空き容量を確認                                                                       [####################################################] 100%
:: パッケージの変更を処理しています...
(1/1) インストール microsoft-edge-stable-bin                                               [####################################################] 100%
microsoft-edge-stable-bin の提案パッケージ
    libpipewire02: WebRTC desktop sharing under Wayland
    kdialog: for file dialogs in KDE
    gnome-keyring: for storing passwords in GNOME keyring [インストール済み]
    kwallet: for storing passwords in KWallet
    libunity: for download progress on KDE
    ttf-liberation: fix fonts for some PDFs - CRBug #369991
    xdg-utils [インストール済み]
:: トランザクション後のフックを実行...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating icon theme caches...
(3/3) Updating the desktop file MIME type cache...
$

検索

  • パッケージの検索
    $ yay -Ss 検索ワード1 検索ワード2 ...
  • インストール済みパッケージの検索
    $ yay -Qs 検索ワード1 検索ワード2 ...
  • パッケージの情報表示
    $ yay -Si パッケージ名
  • インストール済みパッケージの情報表示
    $ yay -Qi パッケージ名

アンインストール

  • パッケージの削除
    $ yay -R パッケージ名
  • 削除したいパッケージと、そのパッケージだけが必要としている他のパッケージを一緒に削除
    $ yay -Rs パッケージ名

参考

コメント

タイトルとURLをコピーしました