急~apt-get更新遇上問題 [論壇 - Ubuntu安裝問題]
正在瀏覽:
1 名遊客
急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員一級
![]() ![]() 註冊日期:
2019/5/5 13:02 所屬群組:
已註冊使用者 等級: 1
HP : 0 / 18
![]() |
在要安裝 fswebcam時遇到了以下問題
/bin/sh: 1: /usr/bin/apt-listchanges: not found E: 子程序 /usr/bin/apt-listchanges --apt || test $? -lt 10 傳回錯誤碼 (1) E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10 查看了很多方法之後,不管是耕莘還是怎樣都是一樣的結果,懇求大大們幫幫我了!感謝
2019/5/5 13:10
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
popoe 寫到: 我根據您上面提供的訊息,做了點測試, 我無法確定在您的環境,是那個套件在安裝的時候,需要使用到「/usr/bin/apt-listchanges」, 原本我的想法,是先移除那個套件,不過既然我找不到,就換個策略, 因此目前我想到能給您的建議是先安裝「apt-listchanges」, 然後您再測看看您原本動作,看看是否能恢復正常運作。
以上是安裝「apt-listchanges」的指令。 ================================================================================ 在您的環境,您可以執行下面指令,測看看,也許您能找到線索, 了解到是哪個套件,在安裝過程,需要用到「apt-listchanges」。 執行
或是執行
================================================================================ 以下是我一些測試的紀錄。只是提供參考,您並不需要去操作下面的步驟 我測試的環境是「Ubuntu 18.04」 。 ================================================================================ 執行
顯示
表示「/usr/bin/apt-listchanges」是來自於「apt-listchanges」這個「Package」。 ================================================================================ 執行
顯示 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 +++-===============================-====================-====================-======= un apt-listchanges <none> <none> (no description available) 顯示我的環境並沒有安裝「apt-listchanges」。 ================================================================================ 執行
顯示
================================================================================ 另外我探索了「fswebcam」這個「Package」 執行
會下載一個檔案「fswebcam_20140113-2_amd64.deb」。 ================================================================================ 執行下面指令解開「Control File」和「Maintainer Scripts」。
會產生一個資料夾「DEBIAN」, 執行
顯示 DEBIAN/ ├── control └── md5sums 0 directories, 2 files 看起來只有「Control File」,並沒有「Maintainer Scripts」 所以初步推論這個套件,在安裝的過程,應該是沒有使用到「/usr/bin/apt-listchanges」。 ================================================================================ 執行
顯示 apt-listchanges Reverse Depends: python-apt python-apt amavisd-new cyrus-common apticron-systemd apticron debconf amavisd-new ================================================================================ 以前有紀錄一些套件操作的討論案例,放在「[索引] 套件操作實務」。 ================================================================================ 以上提供參考 報告完畢 ![]()
2019/5/5 23:13
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員一級
![]() ![]() 註冊日期:
2019/5/5 13:02 所屬群組:
已註冊使用者 等級: 1
HP : 0 / 18
![]() |
依舊沒能解決情況,我這樣子應該有裝到apt-listchange,但是他還是找不到它。
2019/5/6 12:52
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
popoe 寫到: ================================================================================ 在您的環境,您可以執行下面指令,測看看,也許您能找到線索, 了解到是哪個套件,在安裝過程,需要用到「apt-listchanges」。 執行
或是執行
然後您再把結果貼上來,也許有機會能找到一些線索。 ================================================================================ 另外在「/var/log/apt/」這個資料夾,有放置一些log檔案,也可以研究看看。 相關的log,是「/var/log/dpkg.log*」。 ================================================================================ 以下是在我的環境,安裝「apt-listchanges」的流程紀錄,提供參考。
正常的狀況下,會安裝成功 ================================================================================ 執行
顯示 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 apt-listchanges 3.16 all package change history notification tool 注意前面的「ii」。 另外我的環境是英文介面,所以呈現上面的訊息。 ================================================================================ 以下我改變環境變數,來呈現中文的訊息。 執行
顯示 要求=U:未知/I:安裝/R:刪除/P:清除/H:保留 | 狀態=N:未安裝/I:已安裝/C:設定檔/U:已解開/F:半設定/H:半安裝/W:待觸發/T:未觸發 |/ 錯誤?=(無)/R:須重新安裝(狀態,錯誤:大寫=有問題) ||/ 名稱 版本 硬體平台 簡介 +++-===============================-====================-====================-======= ii apt-listchanges 3.16 all package change history notification tool ================================================================================ 執行
顯示
================================================================================ 執行
顯示
================================================================================ 執行
顯示
================================================================================ 以上提供參考 報告完畢 ![]()
2019/5/6 20:38
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員一級
![]() ![]() 註冊日期:
2019/5/5 13:02 所屬群組:
已註冊使用者 等級: 1
HP : 0 / 18
![]() |
以下是我跑完的之後結果。
2019/5/7 14:26
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
收到,
不過我被您考倒了,目前我也看不出所以然。 Orz... ============================================================ 另外我有使用「/usr/bin/apt-listchanges --apt」當作關鍵字查詢, 可以看到有一些討論, * https://forum.siduction.org/index.php?topic=6343.0 * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835046 * https://bugs.launchpad.net/ubuntu/+source/apt-listchanges/+bug/1614191 * https://askubuntu.com/questions/963626/not-able-to-install-anything-in-ubuntu-16-04 * https://www.itread01.com/content/1544373062.html 不過我並不確定上面提到的,是否符合您遇到的狀況。 ============================================================ 另外確認一下,您使用的是「Debian」? * https://packages.debian.org/stretch/apt-listchanges 「Package: apt-listchanges (3.10)」 * http://cdn-fastly.deb.debian.org/debian/pool/main/a/apt-listchanges/ ============================================================ 根據 * https://forum.siduction.org/index.php?topic=6343.0 我看了一下我的環境「Ubuntu 18.04」
顯示
============================================================ 然後從下面的網址 (Debian) * http://cdn-fastly.deb.debian.org/debian/pool/main/a/apt-listchanges/ 執行
會下載「apt-listchanges_3.10_all.deb」 接著執行下面指令解開
會產生一個資料夾「apt-listchanges」 執行
顯示 apt-listchanges ├── etc │ └── apt │ └── apt.conf.d │ └── 20listchanges └── usr ├── bin │ └── apt-listchanges └── share ├── apt-listchanges │ ├── ALCApt.py │ ├── ALCConfig.py │ ├── ALChacks.py │ ├── ALCLog.py │ ├── ALCSeenDb.py │ ├── AptListChangesGtk.py │ ├── apt_listchanges.py │ ├── apt-listchanges.ui │ └── DebianFiles.py ├── doc │ └── apt-listchanges │ ├── changelog.gz │ ├── copyright │ ├── NEWS.Debian.gz │ ├── README.Debian │ └── TODO ├── locale │ ├── ar │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── ca │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── cs │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── da │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── de │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── es │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── et │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── eu │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── fi │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── fr │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── gl │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── it │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── ja │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── nl │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── pl │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── pt │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── pt_BR │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── ru │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── sv │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ ├── zh_CN │ │ └── LC_MESSAGES │ │ └── apt-listchanges.mo │ └── zh_TW │ └── LC_MESSAGES │ └── apt-listchanges.mo ├── man │ ├── de │ │ └── man1 │ │ └── apt-listchanges.1.gz │ ├── es │ │ └── man1 │ │ └── apt-listchanges.1.gz │ ├── fr │ │ └── man1 │ │ └── apt-listchanges.1.gz │ ├── it │ │ └── man1 │ │ └── apt-listchanges.1.gz │ ├── man1 │ │ └── apt-listchanges.1.gz │ └── pl │ └── man1 │ └── apt-listchanges.1.gz └── python3 └── runtime.d └── apt-listchanges.rtupdate 66 directories, 44 files 執行
顯示
============================================================ 目前只有探索到這 先做個紀錄
2019/5/8 1:25
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
延續上面「#6」提到的,
做了點小實驗,先紀錄一下,我測試的環境是「Ubuntu 18.04」。 將「/etc/apt/apt.conf.d/20listchanges」改成如下,也就是註解下面兩行。
接著執行
顯示 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: hello 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/27.2 kB of archives. After this operation, 111 kB of additional disk space will be used. apt-listchanges warning: Incorrect value (0) of APT_HOOK_INFO_FD environment variable. If the warning persists after restart of the package manager (e.g. aptitude), please check if the /etc/apt/apt.conf.d/20listchanges file was properly updated. apt-listchanges: Wrong or missing VERSION from apt pipeline (is Dpkg::Tools::Options::/usr/bin/apt-listchanges::Version set to 2?) E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1) E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10
2019/5/8 13:03
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員一級
![]() ![]() 註冊日期:
2019/5/5 13:02 所屬群組:
已註冊使用者 等級: 1
HP : 0 / 18
![]() |
pi@raspberrypi:~ $ sudo /etc/apt/apt.conf.d/20listchanges
sudo: /etc/apt/apt.conf.d/20listchanges: command not found 是不是環境變量的問題?
2019/5/8 17:33
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
popoe 寫到: 關於「/etc/apt/apt.conf.d/20listchanges」這個檔案, 功用應該不是當作「executable script」來使用,所以您不該直接執行它。 它應該只是設定檔,apt執行過程會讀取該設定,來做一些動作。 關於指令,我之前有建立一個「[索引]如何執行指令」。 裡面有列一些參考文章連結,可以從中去了解一些概念。 ============================================================ popoe 寫到: 因為已經使用「絕對路徑 (/usr/bin/apt-listchanges)」了, 所以應該可以排除「PATH」的因素。 您遇到的問題,我建議您應該要去釐清,是什麼原因導致「/usr/bin/apt-listchanges」不能執行(or not found), * 是檔案不存在? (您給的訊息是「not found(上面的藍色字那一行)」) * 還是沒有執行權限? * 還是沒有讀取權限? * 還是其他的因素? 以下假設「/usr/bin/apt-listchanges」這個檔案不存在 執行
顯示
執行
顯示
先執行
使用的「shell」會切換到「sh」,在「Ubuntu(Debian)」應該是「dash」。 接著再執行
顯示
請對照您原本提供的藍色字訊息。
============================================================ 假設「/usr/bin/apt-listchanges」這個檔案不存在 執行
顯示
============================================================ 假設「/usr/bin/apt-listchanges」這個檔案不存在 執行
顯示
============================================================ 額外一提,「/usr/bin/apt-listchanges」是「Python script」。 執行
顯示
============================================================ 以上 ![]()
2019/5/8 20:10
|
||||||||||
![]() |
回覆: 急~apt-get更新遇上問題 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員五級
![]() ![]() 註冊日期:
2012/4/22 10:50 所屬群組:
已註冊使用者 等級: 37
HP : 0 / 901
![]() |
延續「#9」一開始提到的,
您可以嘗試做個小實驗, 把「/etc/apt/apt.conf.d/20listchanges」移走, 執行下面指令移走
您再執行「sudo apt-get install hello」, 或執行「sudo apt-get remove hello」, 應該就不會出現您一開始在「#1」提到的狀況。 ![]()
2019/5/8 20:32
|
||||||||||
![]() |
您可以查看帖子.
您不可發帖.
您不可回覆.
您不可編輯自己的帖子.
您不可刪除自己的帖子.
您不可發起投票調查.
您不可在投票調查中投票.
您不可上傳附件.
您不可不經審核直接發帖.