1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

openSUSE のパッケージ管理コマンド「zypper」の実践例からの抜粋

Last updated at Posted at 2022-03-03

概要

openSUSE のパッケージ管理コマンド「zypper」の使用方法のメモ.

コマンド一覧

https://ja.opensuse.org/SDB:Zypper_%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9
image.png

 

実行例

Dockerfile における zypper 呼び出しに対して、コマンドの意味を書く

FROM opensuse/ruby:2.6

(略)

#! 🏷️エイリアスなし で リポジトリ を追加する
RUN zypper addrepo https://download.opensuse.org/repositories/devel:languages:go/openSUSE_Leap_15.0/devel:languages:go.repo && \

#! 🏷️エイリアスあり(devel:tools) で リポジトリ を追加する
    zypper addrepo https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_15.0/ devel:tools && \

#! 🏷️「--gpg-auto-import-keys」... 新規リポジトリの署名を自動的に信頼する
#! 🏷️「ref」...パッケージを自動更新する (「refresh」と同じ)
    zypper --gpg-auto-import-keys ref && \

#! 🏷️「-n」... 自動的に y を入力する. (「--non-interactive」と同じ)
#! 🏷️「--no-recommends」... 初期インストール時に選択解除したパッケージが再び追加されないようにする
    zypper -n in --no-recommends ruby2.6-devel \
           libmariadb-devel postgresql-devel \
           nodejs libxml2-devel libxslt1 git-core \
           go1.10 phantomjs gcc-c++ && \

#! 🏷️「in」... install
#! 🏷️「-t pattern devel_basis」... devel_basis を含むパッケージをインストールする
    zypper -n in --no-recommends -t pattern devel_basis && \
    略

#! 🏷️「rm」...パッケージ(wicked、wicked-service、autoconf など)を削除する.
#! 🏷️「wicked」...wicked は ifup に代わるツールの模様
    zypper -n rm wicked wicked-service autoconf automake \
           binutils bison cpp flex gdbm-devel gettext-tools \
           libtool m4 make makeinfo && \

#! 🏷️削除または ローカルでキャッシュをクリアする
    zypper clean -a

 

参考サイト

URL 備考
https://qiita.com/gentaro/items/5a955ad63463497752b4
https://documentation.suse.com/ja-jp/sles/15-SP1/html/SLES-all/cha-upgrade-online.html
https://www.techrepublic.com/article/how-to-install-patterns-in-opensuse-and-suse/ 「-t pattern 文字」
https://www.linuxadictos.com/ja/aprende-zypper-con-estos-sencillos-comandos.html
https://en.opensuse.org/Portal:Wicked wicked は ifup に代わるツールの模様
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?