[Cygwin] 使用 apt-cyg 管理 Cygwin 的套件

Cygwin 可以安裝許多套件,不過都需要透過 EXE 安裝檔來進行安裝,如果想要直接在 Cygwin CLI 內進行安裝,可以使用 apt-cyg

 

apt-cyg 安裝到 /usr/local/bin

wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg -O /usr/local/bin/apt-cyg
chmod +x /usr/local/bin/apt-cyg

 

這裡列出常用的指令,完整指令說明可參考  apt-cyg

# 在已安裝的套件中搜尋與 dns 相關的套件
apt-cyg search dns

# 線上搜尋(cygwin.com)與 dns 相關的套件
apt-cyg searchall dns

# 安裝 bind-utils 套件
apt-cyg install bind-utils

# 移除 bind-utils 套件
apt-cyg remove bind-utils

 

 

[Ubuntu] Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

如題,在使用 APT 安裝套件時,如果當下有其它的 APT process 執行中,便會出現下列錯誤訊息:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? 

Read more “[Ubuntu] Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?”

[Ubuntu] dpkg: warning: files list file for package * missing; assuming package has no files currently installed

某天在 Ubuntu 上使用 apt-get install 安裝套件時狂噴 warning …

dpkg: warning: files list file for package 'node-lockfile' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libhtml-tagset-perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'node-normalize-package-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'update-inetd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'x11proto-dri2-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'node-npmlog' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblockfile-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblzma5:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblzma5:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python-gnupginterface' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libhttp-date-perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjs-node-uuid' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'pdksh' missing; assuming package has no files currently installed
# 族繁不及備載...

Read more “[Ubuntu] dpkg: warning: files list file for package * missing; assuming package has no files currently installed”

[Ubuntu] add-apt-repository

有些特定軟體需要新增 PPA source 才可以安裝

要新增 PPA source 端就要使用 add-apt-repository 這個指令

要使用這個指令必須安裝 python-software-properties

sudo apt-get install python-software-properties -y

 

Ubuntu 13 以上的版本請改安裝 software-properties-common 這個套件

sudo apt-get install software-properties-common -y