我關注了以下帖子如何設定 apt-cacher 伺服器?,但出現此錯誤:
got@got-mypc:/var/cache/apt/archives$ sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives/
Importing from /var/cache/apt/archives/
Moving package files from /var/cache/apt/archives/ to /var/cache/apt-cacher
Importing: account-plugin-facebook_0.8-0ubuntu2.2_i386.deb
Failed to move account-plugin-facebook_0.8-0ubuntu2.2_i386.deb to /var/cache/apt-cacher/packages/account-plugin-facebook_0.8-0ubuntu2.2_i386.deb: Permission denied.
Try read-only (-r) or symlink (-l) options. at /usr/share/apt-cacher/apt-cacher-import.pl line 364.
為什麼 facebook 會出錯,因為我自己至少沒有安裝任何 FB 外掛。我也嘗試過使用 root 登錄,但沒有成功。現在怎麼解決這個問題。
答案1
有 3 個選項。
使用唯讀選項:
sudo /usr/share/apt-cacher/apt-cacher-import.pl -r /var/cache/apt/archives/
使用符號連結選項:
sudo /usr/share/apt-cacher/apt-cacher-import.pl -l /var/cache/apt/archives/
刪除有問題的套件並重試:
sudo rm /var/cache/apt/archives/account-plugin-facebook_0.8-0ubuntu2.2_i386.deb to /var/cache/apt-cacher/packages/account-plugin-facebook_0.8-0ubuntu2.2_i386.deb sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives/