星期六, 四月 26, 2008

Debian 尋找某檔案在哪個 Package 的工具: apt-file

Debian/Ubuntu 平常在都靠 apt 在找 Package, 突然想玩 GTK,範例程式要 Compile 時, 就發現 gtk/gtk.h 不存在, 結果 apt-cache search 的結果, 不知道要裝哪一個~ @.@a..(好像全部都不對)

apt-file 正好可以拿來做檔案的 快速尋找(找此檔案在哪個 Package 有), 安裝 使用 方式如下:

  1. apt-get install apt-file
  2. apt-file update # 更新
  3. apt-file search gtk/gtk.h # 搜尋有 gtk/gtk.h 的 Package
    找到 libgtk2.0-dev: usr/include/gtk-2.0/gtk/gtk.h, 於是 apt-get install libgtk2.0-dev 即可.

除了搜尋之外, 如果有 Package 尚未安裝, 想要看 File list, 也可以用 apt-file:

  • apt-file list PackageName

其它相關網頁

相關標籤

this is comment icon Compiling things on Ubuntu Linux the Easy Way [回覆]

昨天剛好也看到相關的How to 介紹apt-file
Compiling things on Ubuntu Linux the Easy Way
https://help.ubuntu.com/community/CompilingEasyHowTo

今天看到你這篇
故貼上連結增添相關介紹

Comment by lp81sam (04/29/2008 09:39)

this is comment icon [回覆]

apt-auto可以幫忙把缺少的裝好.

Comment by cashboxhung (04/29/2008 12:35)

this is comment icon 回 lp81sam [回覆]

嗯嗯, 感恩... Orz..

Comment by Tsung (04/29/2008 13:21)

this is comment icon 回 cashboxhung [回覆]

您指的是 auto-apt 嗎? (我找不到 apt-auto.. Orz)
http://www.debian.org.tw/index.php/auto-apt

Comment by Tsung (04/29/2008 13:50)

this is comment icon [回覆]

很久以前用過.

只記得auto & apt

原來擺錯位置了!

Comment by cashboxhung (04/29/2008 19:51)

this is comment icon 回 cashboxhung [回覆]

嗯嗯, 感恩.. 看起來是個好工具, 我研究完會再整理一下的 :)

Comment by Tsung (04/29/2008 23:09)
Add this page to del.icio.us Add this page to Yahoo Taiwan's bookmark Add this page to MyShare

發表迴響

標題

內容 (限制 1000 字)

暱稱

電子郵件

個人網頁


 authimage


PS: 若無法留言, 請先確認是否有打開 JavaScript, 造成您的困擾, 實在萬分對不起 Orz...(如果無法留言, 勞煩可以發信給我好嗎? 謝謝.)
PS2: 若您的留言被誤判, 我都會再自行看過, 不需要一直重覆張貼~