2
1

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 5 years have passed since last update.

Debian Package 操作メモ

Last updated at Posted at 2018-07-28

$ は入力する必要はないです。 root ユーザーで実行した時は sudo は要りません

インストール済みパッケージのパッケージを見る

一覧

$ dpkg -l

特定の package が入っているかを知りたいとき

$ dpkg -l libssl-dev

バージョンとかも分かる。

必要な行だけほしければ grep

$ dpkg -l | grep libssl-dev
iU  libssl-dev:armhf                1.0.2l-1~bpo8+1              armhf        Secure Sockets Layer toolkit - development files

インストールされたファイル

$ dpkg -L パッケージ名

ちなみにここで表示されるファイルの更新日は、インストールした時間とは限らない、なはずです(事前に他のパッケージのファイルとしてインストールされている場合?)

パッケージに関する公開情報を知る

web だとこちらから観られます。便利 https://packages.debian.org/ja/

一覧を更新する

何も考えずに叩いておくとよいやつ。

$ sudo apt-get update

一覧から検索する

$ apt-cache search パッケージ名の一部

詳細を見る

$ apt-cache policy パッケージ名

インストール

最新を入れたい

先に apt-get update して一覧を更新しておきましょう

$ sudo apt-get install パッケージ名

バージョンを指定してインストールしたい

$ sudo apt-get install パッケージ名=バージョン

手元にある deb ファイルからインストールしたい

$ sudo dpkg -i ファイルパス

更新

先に apt-get update して一覧を更新しておきましょう

$ sudo apt-get upgrade
2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?