Обновление из Ubuntu 16.04 LTS к 18.04 LTS перестало работать

Сегодня несколько попыток обновления из Ubuntu 16.04 LTS к 18.04 LTS перестали работать. Я делал попытку этого использования и программное обеспечение программа Updater и командная строка. Вот вывод от командной строки (обрезающий 'http': к 'ttp':):

$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                           
Get:2 Upgrade tool [1,258 kB]                                                  
Fetched 1,259 kB in 0s (0 B/s)                                                 
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit ttp://us.archive.ubuntu.com/ubuntu xenial InRelease                       
Hit ttp://us.archive.ubuntu.com/ubuntu xenial-updates InRelease               
Hit ttp://us.archive.ubuntu.com/ubuntu xenial-backports InRelease             
Ign ttp://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease        
Ign ttp://dl.google.com/linux/chrome/deb stable InRelease                     
Hit ttp://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release          
Get:1 ttp://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]     
Ign ttp://dl.google.com/linux/talkplugin/deb stable InRelease                 
Hit ttp://dl.google.com/linux/chrome/deb stable Release                       
Hit ttp://dl.google.com/linux/talkplugin/deb stable Release                   
Hit https://repo.skype.com/deb stable InRelease                                
Ign https://storage.googleapis.com/download.dartlang.org/linux/debian stable InRelease
Hit https://download.virtualbox.org/virtualbox/debian xenial InRelease         
Ign https://storage.googleapis.com/download.dartlang.org/linux/debian unstable InRelease
Hit https://storage.googleapis.com/download.dartlang.org/linux/debian stable Release
Hit https://storage.googleapis.com/download.dartlang.org/linux/debian unstable Release
Hit https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease    
Fetched 107 kB in 0s (0 B/s)                                                   

(appstreamcli:22168): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:22168): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed

(appstreamcli:22168): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:22168): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed

(appstreamcli:22168): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:22168): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
  Hold prevents MarkGarbage of libnl-route-3-200 [ amd64 ] < 3.2.21-1 -> 3.2.27-1ubuntu0.16.04.1 > ( libs )
  Hold prevents MarkGarbage of libnl-route-3-200 [ amd64 ] < 3.2.21-1 -> 3.2.27-1ubuntu0.16.04.1 > ( libs )

Updating repository information

Third party sources disabled 

Some third party entries in your sources.list were disabled. You can 
re-enable them after the upgrade with the 'software-properties' tool 
or your package manager. 

To continue please press [ENTER]

Hit ttp://us.archive.ubuntu.com/ubuntu bionic InRelease                                               
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                       
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                     
Get:1 ttp://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]                            
Fetched 83.2 kB in 0s (0 B/s)                                                                          
The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "policy" on an undefined value at /usr/bin/apt-show-versions line 56.
Hit ttp://security.ubuntu.com/ubuntu bionic-security InRelease                                        
Hit ttp://us.archive.ubuntu.com/ubuntu bionic InRelease                                               
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                       
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                     
Fetched 0 B in 0s (0 B/s)                                                                              
The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "policy" on an undefined value at /usr/bin/apt-show-versions line 56.
Hit ttp://us.archive.ubuntu.com/ubuntu bionic InRelease                                               
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                       
Hit ttp://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                     
Get:1 ttp://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]                            
Fetched 83.2 kB in 0s (0 B/s)                                                                          
The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "policy" on an undefined value at /usr/bin/apt-show-versions line 56.

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 

E:Problem executing scripts APT::Update::Post-Invoke-Success 'test -x 
/usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i', 
E:Sub-process returned an error code 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
  Hold prevents MarkGarbage of libnl-route-3-200 [ amd64 ] < 3.2.21-1 -> 3.2.27-1ubuntu0.16.04.1 > ( libs )
  Hold prevents MarkGarbage of libnl-route-3-200 [ amd64 ] < 3.2.21-1 -> 3.2.27-1ubuntu0.16.04.1 > ( libs )

Комментарии:

Я ранее успешно обновил эту машину от 14,04 до 16,04. Таким образом, я весьма знаком с процессом.

Следующее сообщение об отказе появилось при использовании и программного обеспечения Updater и командной строки:

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 

E:Problem executing scripts APT::Update::Post-Invoke-Success 'test -x 
/usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i', 
E:Sub-process returned an error code

Прежде, чем делать попытку обновления, я успешно вызвал sudo apt-get update несколько раз сегодня, таким образом, я не думаю, что у меня есть проблема сетевого соединения.

В выводе выше, следующее сообщение, кажется, является значительным, как это появляется три раза:

The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
Can't call method "policy" on an undefined value at /usr/bin/apt-show-versions line 56.

Это - единственное место, я мог определить местоположение строки 'APT:: Выпуск по умолчанию':

$ cat /etc/apt/apt.conf
APT::Default-Release "stable";

способные выставочные версии являются программой Perl. Если я копирую ту программу в каталог царапины и выполняю ее как мой собственный пользователь, использующий/usr/bin/perl, программа завершается успешно и без вывода ошибок. Это не выдает исключение в этих строках:

55 my $cache = AptPkg::Cache->new;
56 my $policy = $cache->policy;

Кто-либо может диагностировать?

Большое спасибо.

Jim Keenan

6
задан 1 September 2018 в 08:44

2 ответа

Я думаю, что необходимо сделать, согласно , этот поток является редактированием apt.conf файл:

sudo nano /etc/apt/apt.conf

И изменение содержание к этому:

APT::Default-Release *;
5
ответ дан 23 November 2019 в 07:53

+1 это сработало для меня. Мне пришлось создать новый файл /etc/apt/apt.conf

Я остановил обновление, когда заметил ошибку, создал новый файл apt.conf, а затем «do-release-upgrade» попросил меня обновить/обновить прежде чем вернуться к do-release-upgrade.

0
ответ дан 1 February 2021 в 02:57

Другие вопросы по тегам:

Похожие вопросы: