---
slug: "ubuntu-do-release-upgrade-libnih1-stack"
title: "ubuntu18.04 へのアップデート中に止まったら"
description: "sudo do-release-upgrade\nをした時に\nSetting up libnih1:amd64 (1.0.3-6ubuntu2) ...\nここで固まった場合の対応メモ"
url: "https://www.ytyng.com/blog/ubuntu-do-release-upgrade-libnih1-stack"
publish_date: "2018-09-03T08:36:54Z"
created: "2018-09-03T08:36:54Z"
updated: "2026-02-27T08:49:09.422Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20240629/40bff7561e194b15b72560f1936b6774.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "ja"
---

# ubuntu18.04 へのアップデート中に止まったら

<pre>sudo do-release-upgrade</pre>
<p>...</p>
<pre>Setting up libnih1:amd64 (1.0.3-6ubuntu2) ...</pre>
<p>ここで固まったら</p>
<p>別ターミナルを起動するとかして、再起動をかける</p>
<p>(念の為 top を見て稼働しているプロセスが無いか見ておくといいかも)</p>
<pre>$ sudo reboot</pre>
<p></p>
<p>再起動後、</p>
<pre>$ sudo apt update</pre>
<p>してみたら</p>
<pre>Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease<br /> Temporary failure resolving 'security.ubuntu.com'<br />Err:2 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease<br /> Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />Err:3 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease<br /> Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />Err:4 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease<br /> Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />Reading package lists... Done<br />Building dependency tree<br />Reading state information... Done<br />257 packages can be upgraded. Run 'apt list --upgradable' to see them.<br />W: Failed to fetch http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />W: Failed to fetch http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />W: Failed to fetch http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'ap-northeast-1.ec2.archive.ubuntu.com'<br />W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Temporary failure resolving 'security.ubuntu.com'<br />W: Some index files failed to download. They have been ignored, or old ones used instead.</pre>
<p>こんなエラーが出たので</p>
<pre>sudo dpkg --configure -a</pre>
<pre>sudo apt --fix-broken install</pre>
<pre>sudo apt upgrade -y</pre>
<p></p>
<p>エラーが出る場合、対処コマンドが表示されることが多いのでよく読んで、</p>
<pre>sudo apt update -y; sudo apt upgrade -y;</pre>
<p>でエラーが表示されない状態にして、エラーが出なくなったら</p>
<pre>sudo reboot</pre>
<p></p>
<p>はまった所</p>
<p>python3.5-&gt;python3.6 になっているので、3.5 にリンクする形で venv 作っていると壊れる。</p>
<p>どうせなので python3.6で venv を作り直すといい</p>
<pre>python3.6 -m venv venv</pre>
<p></p>
<p>MySQL 5.7 のインストールで競合が起きて mysql-server がインストールされないことがある。<br /><br /></p>
<p></p>
<pre>Errors were encountered while processing:<br />&nbsp;mysql-server-5.7<br />&nbsp;mysql-server<br />Error in function:<br /><br /><br />*** Send problem report to the developers?<br /><br />After the problem report has been sent, please fill out the form in the<br />automatically opened web browser.<br /><br />What would you like to do? Your options are:<br />&nbsp; S: Send report (389.0 KB)<br />&nbsp; V: View report<br />&nbsp; K: Keep report file for sending later or copying to somewhere else<br />&nbsp; I: Cancel and ignore future crashes of this program version<br />&nbsp; C: Cancel<br /><br /></pre>
<p></p>
<p>キャンセル後、一旦消して</p>
<pre>sudo apt remove mysql-server</pre>
<p>アップグレード完了後再インストールすると楽かも。念の為DBはバックアップとっておいてください。</p>
<pre>sudo apt install mysql-server</pre>
<p></p>
<p></p>
<p></p>
