Linux小工具(4)之apt軟件管理

 

目錄

前言

一、apt簡介

二、工作原理

三、常用的apt命令(重點)

1、首先配置軟件更新源

2、apt-get update

3、apt-cache系列

(3.1)apt-cache search pkg-name

(3.2)apt-file search file-name(重要)

(3.3)apt-cache show pkg-name

(3.4)apt-cache policy package_name

(3.5)apt-cache depends pkg-name(重要)

(3.6)apt-cache rdepends package_name(重要)

(4)apt-get系列

第一部分:軟件的更新和升級

(4.1)apt-get update 

(4.2)apt-get upgrade (+pkg-name)

(4.3)apt-get dist-upgrade (+pkg-name)

小結注意

第二部分:軟件安裝

(4.4)sudo apt-get install pkg-name(重要)

(4.5)sudo apt-get install pkg-name --reinstall

(4.6)sudo apt-get install -f pkg-name(重要)

(4.7)sudo apt-get check

(4.8)apt-get build-dep pkg-name

第三部分:軟件移除

(4.9)apt-get remove pkg-name

(4.10)apt-get purge remove  pkg-name

(4.11)apt-get autoremove pkg-name

(4.12)apt-get clean

(4.13)apt-get autoclean

小結注意

四、Ubuntu軟件包查看

1、查詢操作

(1)dpkg -l

(2)dpkg -S等其他命令

小結注意

五、參考附錄



前言

在使用Linux系統時,會發現軟件管理並不如Windows下那麼方便直接。Windows下可以直接使用360或是騰訊管家之類的軟件對系統下的軟件進行統一管理:安裝、更新、卸載等操作,那麼Linux也有類似的工具,debian系列是apt管家工具,而Redhat是dnf(或yum)等。

平臺說明:

vmware安裝的Ubuntu16.04.2系統


一、apt簡介

下面介紹主要來源於:百度百科

Advanced Packaging Tool(apt)是Linux下的一款安裝包管理工具,是一個客戶/服務器系統

最初,linux系統下只有.tar.gz的打包文件,用戶必須編譯每個他想在GNU/Linux上運行的軟件。用戶們普遍認爲系統很有必要提供一種方法來管理這些安裝在機器上的軟件包。當Debian誕生時,這樣一個管理工具也就應運而生,它被命名爲dpkg。從而著名的“package”概念第一次出現在GNU/Linux系統中,稍後Red Hat才決定開發自己的“rpm”包管理系統。

很快一個新的問題難倒了GNU/Linux製作者,他們需要一個快速、實用、高效的方法來安裝軟件包,當軟件包更新時,這個工具應該能自動管理關聯文件和維護已有配置文件。Debian再次率先解決了這個問題,APT(Advanced Packaging Tool)作爲dpkg的前端誕生了。APT後來還被Conectiva改造用來管理rpm,並被其它Linux發行版本採用爲它們的軟件包管理工具

APT由幾個名字以“apt-”打頭的程序組成,如:apt-get、apt-cache 和apt-cdrom等處理軟件包的命令行工具。

Linux命令—apt,也是其它用戶前臺程序的後端,如dselect 和aptitude

注意:

作爲操作的一部分,APT使用一個文件列出可獲得軟件包的鏡像站點地址,這個文件就是/etc/apt/sources.list。

用戶可以將apt理解爲Windows下騰訊管家等類似的軟件。


二、工作原理

APT是一個客戶/服務器系統

在服務器上先複製所有DEB包(DEB是Debian軟件包格式的文件擴展名),然後用APT的分析工具(genbasedir)根據每個DEB 包的包頭(Header)信息對所有的DEB包進行分析,並將該分析結果記錄在一個文件中,這個文件稱爲DEB 索引清單,APT服務器的DEB索引清單置於base文件夾內。一旦APT 服務器內的DEB有所變動,一定要使用genbasedir產生新的DEB索引清單。客戶端在進行安裝或升級時先要查詢DEB索引清單,從而可以獲知所有具有依賴關係的軟件包,並一同下載到客戶端以便安裝。

當客戶端需要安裝、升級或刪除某個軟件包時,客戶端計算機取得DEB索引清單壓縮文件後,會將其解壓置放於/var/state/apt/lists/(本人Ubuntu裏沒找到),而客戶端使用apt-get install或apt-get upgrade命令的時候,就會將這個文件夾內的數據和客戶端計算機內的DEB數據庫比對,知道哪些DEB已安裝、未安裝或是可以升級的。


三、常用的apt命令(重點)

apt相關命令會在linux開發過程中多次用到,這裏對相關命令進行說明:

1、首先配置軟件更新源

命令:vim /etc/apt/source.list

ye@ubuntu:/$ more /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

如上是apt默認的軟件更新源,在安裝、更新軟件時都是從上面的網址上進行的。

用戶可以添加其他網站,如:

#中科大源
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

2、apt-get update

作用:從list的軟件源中下載裏面的元數據Metadata),包括這個源有什麼包, 每個包什麼版本之類的,相當於Windows下面的檢查更新,獲取的是軟件的狀態。

注意:只是更新各種軟件包的狀態,並未真正的更新軟件。無論是安裝還是更新一個軟件,都應該先進行這一步操作。

官方介紹:update is used to download package information from all configured sources.

3、apt-cache系列

apt-cache的主要作用在於:查看信息。

注意:這裏只介紹幾種常用的apt-cache相關的所有命令,用戶可以自行通過命令:man apt-cache 來查看。 

(3.1)apt-cache search pkg-name

作用:在軟件源中搜索程序包,並顯示匹配的軟件包。如,查找dtc工具

yehaiyang@ubuntu:/$ apt-cache search dtc
device-tree-compiler - Device Tree Compiler for Flat Device Trees
ddtc - Deal with ddts mails
dtc-xen - SOAP daemon and scripts to allow control panel management for Xen VMs
dtc-xen-firewall - small firewall script for your dom0
python-dtcwt - Dual-Tree Complex Wavelet Transform library for Python 2
python-dtcwt-doc - Documentation of the Python implementation of the DT-CWT
python3-dtcwt - Dual-Tree Complex Wavelet Transform library for Python 3
sbox-dtc - CGI chroot wrapper script for safer hosting environment
ubuntu-developer-tools-center - transitional dummy package

搜索結果會出現於所有與dtc先關的工具,用戶需要選擇出最合適的並進行安裝。

官方介紹:search can be used to search for the given regex(7) term(s) in the list of available packages and display matches. This can e.g. be useful if you are looking for packages having a specific feature. If you are looking for a package including a specific file try apt-file(1)(如果安裝的軟件包包含特殊的文件,應該使用apt-file命令).

(3.2)apt-file search file-name(重要)

作用:在所有源裏查找包含指定文件的軟件包,包含未安裝的軟件包。

apt-file的詳細作用,可通過:man apt-file 查看。

(3.3)apt-cache show pkg-name

作用:顯示軟件包的一些常規信息,如:軟件包的本地路徑、本地包全稱、大小、版本、依賴的庫等。

yehaiyang@ubuntu:/$ apt-cache show tree
Package: tree
Priority: optional
Section: universe/utils
Installed-Size: 135                    //軟件包大小
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Florian Ernst <[email protected]>
Architecture: amd64                    //處理器構架支持
Version: 1.7.0-3                       //版本號
Depends: libc6 (>= 2.14)               //依賴庫
Filename: pool/universe/t/tree/tree_1.7.0-3_amd64.deb     //本地包全稱
Size: 40572
MD5sum: fefa3e2233bec6823b1b61cfd6ba0105
SHA1: 4fec27e396ff048441be18ded0d9f36e88a17a53
SHA256: d3423501d3464436199e293efaa6e95ec9296e74b6b597edc373e5dc386f9e5b
Description-en: displays an indented directory tree, in color
 Tree is a recursive directory listing command that produces a depth indented
 listing of files, which is colorized ala dircolors if the LS_COLORS environment
 variable is set and output is to tty.
Description-md5: 9b53b68087a50d4cd859ac0117aecc08
Homepage: http://mama.indstate.edu/users/ice/tree/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

注意:還有一個apt-cache showpkg pkg-name的命令,顯示的內容和上述略不同。

(3.4)apt-cache policy package_name

作用:顯示軟件包的安裝狀態、版本信息和安裝源鏈接。如:

yehaiyang@ubuntu:/$ apt-cache policy tree
tree:
  Installed: 1.7.0-3
  Candidate: 1.7.0-3
  Version table:
 *** 1.7.0-3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
yehaiyang@ubuntu:/$ 

(3.5)apt-cache depends pkg-name(重要)

作用:顯示指定軟件包的依賴關係,主要是軟件包和依賴庫等。如:

yehaiyang@ubuntu:/$ apt-cache depends tree
[sudo] password for yehaiyang: 
tree
  Depends: libc6

(3.6)apt-cache rdepends package_name(重要)

作用:顯示軟件包的反向依賴關係,即有什麼軟件包需依賴你所指定的軟件包。如:

yehaiyang@ubuntu:/$ apt-cache rdepends tree
tree
Reverse Depends:
  pass
  hollywood
  sisu-complete
  sisu
  go2
  keyringer
  hollywood

//表示上述這些軟件包安裝時,需要先安裝tree軟件包;
//如下查看 pass
yehaiyang@ubuntu:/$ sudo apt-cache depends pass
pass
  Depends: pwgen
    pwgen:i386
 |Depends: gnupg2
    gnupg2:i386
  Depends: gnupg
    gnupg:i386
  Depends: tree            //表示依賴tree軟件包
  Recommends: gnupg2
    gnupg2:i386
  Recommends: git
    git:i386
  Recommends: xclip
  Suggests: perl
  Suggests: libxml-simple-perl
  Suggests: ruby
yehaiyang@ubuntu:/$ 

其他的幾個相關命令介紹:

1.apt-cache stats
顯示緩存中的所有軟件包的統計信息(內容繁雜);

2.apt-cache dump
顯示緩存中的每個軟件包的簡要描述信息(內容繁雜);

3.apt-cache unmet
顯示緩存中的軟件包不符合一致性的依賴關係(內容繁雜);

4.apt-cache pkgnames
列出更新源中的所有的軟件包(內容繁雜);


(4)apt-get系列

apt-get的主要作用:更新、安裝、升級和移除軟件包。

注意:這裏只介紹幾種常用的apt-get相關的所有命令,用戶可以自行通過命令:man apt-get 來查看。 

第一部分:軟件的更新和升級


(4.1)apt-get update 

作用:從list的軟件源中下載裏面的元數據Metadata),包括這個源有什麼包, 每個包什麼版本之類的,相當於Windows下面的檢查更新,獲取的是軟件的狀態。

(4.2)apt-get upgrade (+pkg-name)

作用:更新所有可升級的軟件包和依賴庫,或是更新pkg-name指定的軟件包和依賴庫。比如:

yehaiyang@ubuntu:/$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  cpp-5 g++-5 gcc-5 gcc-5-base gcc-5-multilib lib32asan2 lib32atomic1 lib32cilkrts5 lib32gcc-5-dev lib32gomp1 lib32itm1 lib32mpx0 lib32quadmath0 lib32stdc++6 lib32ubsan0 libasan2
  libatomic1 libcc1-0 libcilkrts5 libgcc-5-dev libgomp1 libitm1 liblsan0 libmpx0 libquadmath0 libstdc++-5-dev libstdc++6 libtsan0 libubsan0 libunity-control-center1 libx32asan2
  libx32atomic1 libx32cilkrts5 libx32gcc-5-dev libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc++6 libx32ubsan0 unity-control-center unity-control-center-faces
41 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.6 MB of archives.
After this operation, 57.3 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

(4.3)apt-get dist-upgrade (+pkg-name)

作用:更新所有可升級的軟件包,或是更新pkg-name指定的軟件包。

小結注意

  • upgrade:系統將現有的Package升級,如果有相依性的問題,而此相依性需要安裝其它新的Package或影響到其它Package的相依性時,此Package就不會被升級,會保留下來。
  • dist-upgrade:可以聰明的解決相依性的問題,如果有相依性問題,需要安裝/移除新的Package,就會試着去安裝/移除它。(所以通常這個會被認爲是有點風險的升級) 
  • 因此:apt-get upgrade 和 apt-get dist-upgrade 本質上是沒有什麼不同的。
    只不過,dist-upgrade 會識別出當依賴關係改變的情形並作出處理,而upgrade對此情形不處理。

比如:軟件包 a 原先依賴 b c d,但是在源裏面可能已經升級了,現在是 a 依賴 b c e。這種情況更新軟件a:

dist-upgrade 會刪除 d 安裝 e,並把 a 軟件包升級;而 upgrade 會認爲依賴關係改變而拒絕升級 a 軟件包。

參考源:apt-get upgarde 和dist-upgrade的差別

第二部分:軟件安裝


(4.4)sudo apt-get install pkg-name(重要)

作用:安裝一個軟件包,這算是apt中最常用的命令了。如:apt-get install u-boot-tools

yehaiyang@ubuntu:/$ sudo apt-get install u-boot-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  u-boot-tools
0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded.
Need to get 97.5 kB of archives.
After this operation, 395 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 u-boot-tools amd64 2016.01+dfsg1-2ubuntu3 [97.5 kB]
Fetched 97.5 kB in 21s (4,539 B/s)      
Selecting previously unselected package u-boot-tools.
(Reading database ... 221330 files and directories currently installed.)
Preparing to unpack .../u-boot-tools_2016.01+dfsg1-2ubuntu3_amd64.deb ...
Unpacking u-boot-tools (2016.01+dfsg1-2ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up u-boot-tools (2016.01+dfsg1-2ubuntu3) ...
yehaiyang@ubuntu:/$

(4.5)sudo apt-get install pkg-name --reinstall

作用:重新安裝軟件包,無論軟件包是否已經安裝過。

(4.6)sudo apt-get install -f pkg-name(重要)

作用:修復安裝。-f參數爲--fix-broken的簡寫形式,主要作用是是修復依賴關係(depends),假如用戶的系統上有某個package不滿足依賴條件,這個命令就會自動修復,安裝程序包所依賴的包。

(4.7)sudo apt-get check

作用:檢查所有的軟件包中是否有損壞的依賴。

(4.8)apt-get build-dep pkg-name

作用:在編譯安裝軟件包時,自動安裝相關的編譯環境。比如:要編譯nginx,可以從網上找到需安裝哪些庫,用apt-get install XXXX XXXX XXXX ... 來進行安裝。但是有時候裝了一堆庫,可能有幾個是用不到的。而用apt-get build-dep命令可以更好的管理這些庫文件和編譯環境。

詳見:Debian系統apt-get build-dep命令

第三部分:軟件移除


(4.9)apt-get remove pkg-name

作用:刪除已安裝的軟件包(保留配置文件),不刪除依賴包。

比如:軟件包a,依賴軟件包b,則執行該命令只會刪除a,且保留配置文件。

(4.10)apt-get purge remove  pkg-name

作用:刪除已安裝包(不保留配置文件),不刪除依賴包。

比如:軟件包a,依賴軟件包b,則執行該命令只會刪除a,而且不保留配置文件。

(4.11)apt-get autoremove pkg-name

作用:自動刪除爲了滿足依賴而安裝的,但現在不再需要的軟件包(包括已安裝包)

比如:軟件包a,依賴軟件包b,則執行該命令會同時刪除軟件包a,b。

(4.12)apt-get clean

作用:使用 apt-get clean 會將 /var/cache/apt/archives/ 的 所有 deb 刪掉

類似於:rm /var/cache/apt/archives/*.deb

(4.13)apt-get autoclean

作用:APT的底層包是dpkg,而dpkg 安裝Package時,會將 *.deb 放在 /var/cache/apt/archives/中。

apt-get autoclean 只會刪除 /var/cache/apt/archives/ 已經過期的deb。

小結注意

  • 如果是徹底卸載軟件,推薦使用apt-get purge remove,不推薦使用autoremove,因爲你刪除該依賴軟件包,也可能被其他軟件包所依賴,從而導致其他軟件不可用。
  • 如果是清理硬盤,推薦使用apt-get autoclean,deb安裝後基本上就沒多大用了,完全可以刪除掉

四、Ubuntu軟件包查看

Dpkg 使用文本文件來作爲數據庫,相關的文件一般保存在 /var/lib/dpkg 目錄下。

  • 用戶下載的deb格式的軟件包一般保存在:/var/cache/apt/archives(文檔庫)目錄下。
  •  /var/lib/dpkg 目錄下:status 文件中存儲軟件狀態和控制信息;在 info/ 目錄下備份控制文件, 並在其下的 .list 文件中記錄安裝文件清單, 其下的 .mdasums 保存文件的 MD5 編碼。

1、查詢操作

(1)dpkg -l

作用:查看系統安裝的所有的軟件包,包含用戶自行安裝的。注意:如果系統使用時間長,安裝了許多包查看不便時,可以使用翻頁查看,命令:dpkg -l | less

yehaiyang@ubuntu:~$ dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                    Version                  Architecture             Description
+++-=======================================-========================-========================-====================================================================================
ii  a11y-profile-manager-indicator          0.1.10-0ubuntu3          amd64                    Accessibility Profile Manager - Unity desktop indicator
ii  account-plugin-facebook                 0.12+16.04.20160126-0ubu all                      GNOME Control Center account plugin for single signon - facebook
...
ii  git                                     1:2.7.4-0ubuntu1.6       amd64                    fast, scalable, distributed revision control system
ii  git-man                                 1:2.7.4-0ubuntu1.6       all                      fast, scalable, distributed revision control system (manual pages)
...
ii  hexedit                                 1.2.13-1build1           amd64                    view and edit files in hexadecimal or in ASCII
...
ii  tree                                    1.7.0-3                  amd64                    displays an indented directory tree, in color
...
ii  u-boot-tools                            2016.01+dfsg1-2ubuntu3   amd64                    companion tools for Das U-Boot bootloader
...

如上所述,每一個軟件包有5項描述項,依次爲:狀態標識、軟件包名稱、 版本號、架構支持、簡單描述。

其中,狀態標識的含義爲

  • 第一字符爲期望值,它包括:
    • u 狀態未知,這意味着軟件包未安裝,並且用戶也未發出安裝請求.
    • i 用戶請求安裝軟件包.
    • r 用戶請求卸載軟件包.
    • p 用戶請求清除軟件包.
    • h 用戶請求保持軟件包版本鎖定.
  • 第二列,是軟件包的當前狀態.此列包括軟件包的六種狀態.
    • n 軟件包未安裝.
    • i 軟件包安裝並完成配置.
    • c 軟件包以前安裝過,現在刪除了,但是它的配置文件還留在系統中.
    • u 軟件包被解包,但還未配置.
    • f 試圖配置軟件包,但是失敗了.
    • h 軟件包安裝,但是但是沒有成功.
  • 第三列標識錯誤狀態,可以總結爲四種狀態. 第一種狀態標識沒有問題,爲空. 其它三種符號則標識相應問題.
    • h 軟件包被強制保持,因爲有其它軟件包依賴需求,無法升級.
    • r 軟件包被破壞,可能需要重新安裝才能正常使用(包括刪除).
    • x 軟包件被破壞,並且被強制保持.

(2)dpkg -S等其他命令

  • dpkg --info pkg-name:列出軟件包解包後的包名稱.
  • dpkg -l :列出當前系統中所有的包.可以和參數less一起使用在分屏查看. (類似於rpm -qa)
  • dpkg -l |grep -i pkg-name: 查看系統中與"軟件包名"相關聯的包.
  • dpkg -s :查詢已安裝的包的詳細信息.
  • dpkg -L :查詢系統中已安裝的軟件包所安裝的位置. (類似於rpm -ql)
  • dpkg -S file-name:查詢系統安裝包中某個文件屬於哪個軟件包. (類似於rpm -qf)
  • dpkg -I :查詢deb包的詳細信息,在一個軟件包下載到本地之後看看用不用安裝(看一下唄).
  • dpkg -i :手動安裝軟件包(這個命令並不能解決軟件包之前的依賴性問題),如果在安裝某一個軟件包的時候遇到了軟件依賴的問題,可以用apt-get -f install在解決信賴性這個問題.
  • dpkg -r :卸載軟件包.不是完全的卸載,它的配置文件還存在.
  • dpkg -P 全:部卸載(但是還是不能解決軟件包的依賴性的問題)
  • dpkg -reconfigure :重新配置

小結注意

  • dpkg -S file-name命令很有用,但是要注意和 “apt-file search file-name” 的區別;比如:查找一個源文件mmam.h
yehaiyang@ubuntu:~$ dpkg -S mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/include/uapi/linux/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/tile/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/microblaze/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/metag/include/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/alpha/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/ia64/include/uapi/asm/mman.h
linux-libc-dev:amd64: /usr/include/asm-generic/mman.h
linux-libc-dev:amd64: /usr/include/linux/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/metag/include/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/alpha/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/s390/include/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/arm/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/mips/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/tile/include/uapi/asm/mman.h
linux-libc-dev:amd64: /usr/include/x86_64-linux-gnu/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/include/uapi/asm-generic/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/powerpc/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/include/uapi/asm-generic/mman.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/powerpc/include/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/x86/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/ia64/include/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/score/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/include/uapi/linux/mman.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/powerpc/include/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/mips/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/m32r/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/score/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/frv/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/include/linux/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/parisc/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/include/linux/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/m32r/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/mn10300/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/s390/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/parisc/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/sparc/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/ia64/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/sparc/include/asm/mman.h
libc6-dev-i386: /usr/include/sys/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/sparc/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/ia64/include/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/x86/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/xtensa/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/powerpc/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/mn10300/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/xtensa/include/uapi/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/frv/include/uapi/asm/mman.h
linux-headers-4.15.0-42: /usr/src/linux-headers-4.15.0-42/arch/sparc/include/asm/mman.h
linux-headers-4.8.0-36: /usr/src/linux-headers-4.8.0-36/arch/arm/include/uapi/asm/mman.h
yehaiyang@ubuntu:~$ 

​​​​​​​參考連接:ubuntu安裝和查看已安裝


五、參考附錄

下面是網友總結一些文檔,值得閱讀借鑑:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章