APT

出自TWEmu.no-ip.org

在2009年8月3日 (一) 12:57由WikiSysop (對話 | 貢獻)所做的修訂版本
跳轉到: 導航, 搜尋

本文章僅提供純文字指令


Powered by Moooo....

目錄

設定

簡單使用

Debian

/etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official Multi-architecture i386/amd64/powerpc NETINST #1 20070407-13:10]/ etch contrib main 

# 官方環境
# deb http://ftp.tw.debian.org/debian/ etch main non-free contrib
# deb-src http://ftp.tw.debian.org/debian/ etch main non-free contrib
# deb http://security.debian.org/ etch/updates main non-free contrib
# deb-src http://security.debian.org/ etch/updates main non-free contrib
deb http://ftp.tw.debian.org/debian/ lenny main non-free contrib
deb-src http://ftp.tw.debian.org/debian/ lenny main non-free contrib
deb http://security.debian.org/ lenny/updates main non-free contrib
deb-src http://security.debian.org/ lenny/updates main non-free contrib

deb http://ftp.tw.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.tw.debian.org/debian/ testing main non-free con

deb http://ftp.tw.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.tw.debian.org/debian/ unstable main non-free contrib

# Backports
# deb http://www.backports.org/debian etch-backports main contrib non-free
# deb-src http://www.backports.org/debian etch-backports main contrib non-free

# Virtual box
# deb http://www.virtualbox.org/debian etch non-free
deb http://www.virtualbox.org/debian lenny non-free

# Compiz (no longer maintain)
# deb http://download.tuxfamily.org/shames/debian-sid/desktopfx/unstable/ ./

# wxWidgets/wxPython repository at apt.wxwidgets.org
# deb http://apt.wxwidgets.org/ etch-wx main
# deb-src http://apt.wxwidgets.org/ etch-wx main
deb http://apt.wxwidgets.org/ lenny-wx main
deb-src http://apt.wxwidgets.org/ lenny-wx main


# X.264 and Acrobat Reader ...
# deb http://www.debian-multimedia.org testing main
deb http://www.debian-multimedia.org lenny main

# Debian Kernels
deb http://kernel-archive.buildserver.net/debian-kernel trunk main

# OFSET Debian repository
deb http://debian.ofset.org lenny main
deb-src http://debian.ofset.org lenny main

Source Repostory

Fedora

新竹縣網 APT 伺服器 - APT 的安裝、使用

Proxy

在 /etc/apt/apt.conf 最後方加入

Acquire::Http::Proxy "http://proxy.example:3128";

使用

危險度 (red = 危險, green = 一般)
command 用途
apt-get update 更新套件庫列表
apt-get source <套件名稱> 下載套件至工作目錄下
apt-get check檢查軟體相依性
apt-get upgrade升級軟體
apt-get install <套件名稱>安裝軟體
apt-get build-dep <套件名稱>安裝編譯套件
apt-get dist-upgrade整體系統升級 (建議進純文字模式 ttyX, 關桌面)
apt-get remove <套件名稱>移除軟體
apt-get purge <套件名稱>移除軟體且含設定檔
apt-get autoremove 清除殘留不用的軟體
apt-get auto-clean 清除下載的套件
apt-cache search <關鍵字>搜尋軟體
apt-cache showpkg <套件名稱> 顯示該套件的資料
apt-file update 更新搜尋檔案資訊
apt-file search 搜尋檔案所位於的套件
apt-cdrom add /media/cdrom 把光碟片掛載到套件庫
apt-key add <檔案> 把該檔案加入套件庫信任金鑰
apt-key del <金鑰序號> 把該金鑰移出套件庫信任金鑰
apt-key list 顯示所信任的金鑰
aptitude 純文字的套件管理軟體 (支援中文) 同 synaptic

特殊

參考自[1]

鎖定
echo 'packagename hold'|dpkg --set-selections

解鎖
echo 'packagename install'|dpkg --set-selecions