Difference between revisions of "Unable to Upgrade Ubuntu"

From IVS Wiki
Jump to: navigation, search
(UnicodeDecodeError: 'utf-8' codec can't decode byte)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==UnicodeDecodeError: 'utf-8' codec can't decode byte==
 
==UnicodeDecodeError: 'utf-8' codec can't decode byte==
When attempting to update Ubuntu from version 14.04 LTS to 16.04 using the command '''do-release-upgrade''' you may encounter the following error:
+
When attempting to update Ubuntu from version 14.04 LTS to 16.04, you may encounter an error when entering the following command:
:[[File:TS1.png]]
+
:: <pre>do-release-upgrade</pre>
This error is caused by non utf-8 characters in the /var/lib/dpkg/status file. Follow the instructions below to identify and remove these characters.
+
:::{{img | file = TS1.png}}
# '''grep -avx '.*' /var/lib/dpkg/status'''
+
This error is caused by non UTF-8 characters in the /var/lib/dpkg/status file. Follow the instructions below to identify and remove these characters.
#: This will display any not utf-8 characters in the file
+
# Enter the following command: <pre>grep -avx '.*' /var/lib/dpkg/status</pre>
#: [[File:TS1.png]]
+
#: This will display any not UTF-8 characters in the file.
# '''sudo nano /var/lib/dpkg/status'''
+
#:{{img | file = TS1.png}}
# Locate the bad characters and delete them
+
# Enter the following command: <pre>sudo nano /var/lib/dpkg/status</pre>
# Save the file
+
# Locate the bad characters, and delete them.
 +
# Save the file.
  
 
==/boot is out of space==
 
==/boot is out of space==
# '''dpkg -l | grep linux-image'''
+
# Enter the following command: <pre>dpkg -l | grep linux-image</pre>
 
#: This will display all the kernels currently installed. All but the most recent can be safely deleted.
 
#: This will display all the kernels currently installed. All but the most recent can be safely deleted.
# '''apt-get remove ''old-linux-kernel-package-name'''''
+
# Enter the following: <pre>apt-get remove ''old-linux-kernel-package-name''</pre>
#: ex: ''apt-get remove linux-image-3.13.0-32-generic''
+
:: <pre>Ex: ''apt-get remove linux-image-3.13.0-32-generic''</pre>

Latest revision as of 15:57, 11 May 2022

UnicodeDecodeError: 'utf-8' codec can't decode byte

When attempting to update Ubuntu from version 14.04 LTS to 16.04, you may encounter an error when entering the following command:

do-release-upgrade
TS1.png

This error is caused by non UTF-8 characters in the /var/lib/dpkg/status file. Follow the instructions below to identify and remove these characters.

  1. Enter the following command:
    grep -avx '.*' /var/lib/dpkg/status
    This will display any not UTF-8 characters in the file.
    TS1.png
  2. Enter the following command:
    sudo nano /var/lib/dpkg/status
  3. Locate the bad characters, and delete them.
  4. Save the file.

/boot is out of space

  1. Enter the following command:
    dpkg -l | grep linux-image
    This will display all the kernels currently installed. All but the most recent can be safely deleted.
  2. Enter the following:
    apt-get remove ''old-linux-kernel-package-name''
Ex: ''apt-get remove linux-image-3.13.0-32-generic''