5

Ubuntu 22.04.4 LTS (jammy) - "tzdata is not configured yet". Based on various articles and answers I found, I have tried the following commands...

When I run, # sudo apt upgrade I get the following...

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  python2.7-minimal libheif1 libmagickwand-6.q16-6 libmagickcore-6.q16-6
  imagemagick-6-common python2.7 libde265-0 libpython2.7-minimal
  libpython2.7-stdlib
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
  python3-update-manager update-manager-core
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up tzdata (2024a-0ubuntu0.22.04.1) ...
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper:
 pp18.0.62-bootstrapper depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: tzdata pp18.0.62-bootstrapper ubuntu-minimal needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)

# sudo dpkg --audit returns...

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 tzdata               time zone and daylight-saving time data

# sudo dpkg --configure tzdata returns...

Setting up tzdata (2024a-0ubuntu0.22.04.1) ...
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 tzdata

# sudo apt install --reinstall tzdata returns...

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for tzdata:amd64

# sudo dpkg --configure --pending returns...

Setting up tzdata (2024a-0ubuntu0.22.04.1) ...
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper:
 pp18.0.62-bootstrapper depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: tzdata

# sudo dpkg --force-remove-reinstreq --remove tzdata returns...

dpkg: dependency problems prevent removal of tzdata:
 ubuntu-minimal depends on tzdata.
 python3-tz depends on tzdata.
 pp18.0.62-bootstrapper depends on tzdata.
 pp18.0.61-bootstrapper depends on tzdata.
 pp18.0.60-bootstrapper depends on tzdata.
 libtcl8.6:amd64 depends on tzdata.

dpkg: error processing package tzdata (--remove): dependency problems - not removing Errors were encountered while processing: tzdata

The system is working, but I'm getting errors from tzdata when I try to run sudo apt upgrade. I'm not sure what else to try to get the tzdata package fixed/configured. Any suggestions would be greatly appreciated!

From the first link referenced as a duplicate (Package dbus is not configured yet), I tried the aptitude command...

# sudo aptitude install -f

The following partially installed packages will be configured:
  pp18.0.62-bootstrapper tzdata ubuntu-minimal 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up tzdata (2024a-2ubuntu1) ...   
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper:
 pp18.0.62-bootstrapper depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: tzdata pp18.0.62-bootstrapper ubuntu-minimal needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) Setting up tzdata (2024a-2ubuntu1) ... dpkg: error processing package tzdata (--configure): installed tzdata package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper: pp18.0.62-bootstrapper depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: tzdata pp18.0.62-bootstrapper ubuntu-minimal

From the other link referenced as a duplicate (Dependency errors prevent all APT commands from running, "Package libappstream-glib8:amd64 is not configured yet"), I ran sudo apt-get clean and sudo apt-get update. Both ran (as before) with no warnings or errors.

# sudo apt-get upgrade still got errors...

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  python3-update-manager update-manager-core
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y 
Setting up tzdata (2024a-0ubuntu0.22.04.1) ...
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper:
 pp18.0.62-bootstrapper depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: tzdata pp18.0.62-bootstrapper ubuntu-minimal E: Sub-process /usr/bin/dpkg returned an error code (1)

The next step suggested was... # apt-get install -f

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up tzdata (2024a-0ubuntu0.22.04.1) ...
dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess returned error exit status 10
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of pp18.0.62-bootstrapper:
 pp18.0.62-bootstrapper depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package pp18.0.62-bootstrapper (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-minimal: ubuntu-minimal depends on tzdata; however: Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: tzdata pp18.0.62-bootstrapper ubuntu-minimal E: Sub-process /usr/bin/dpkg returned an error code (1)

In one answer on this page, Elder Geek suggested manually downloading and installing the Debian package from a different mirror. After confirming that /var/cache/apt/archives was empty, I checked https://packages.ubuntu.com/noble/all/tzdata/download for a list of links to download from and ran the following...

# cd /tmp

# wget http://mirrors.kernel.org/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb

--2024-07-27 20:16:48--  http://mirrors.kernel.org/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb
Resolving mirrors.kernel.org (mirrors.kernel.org)... 139.178.88.99, 2604:1380:45e3:2400::1
Connecting to mirrors.kernel.org (mirrors.kernel.org)|139.178.88.99|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://mirrors.edge.kernel.org/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb [following]
--2024-07-27 20:16:49--  http://mirrors.edge.kernel.org/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.199.223, 2604:1380:45d1:ec00::1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.199.223|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 273318 (267K) [application/octet-stream]
Saving to: ‘tzdata_2024a-2ubuntu1_all.deb’

tzdata_2024a-2ubuntu1_all.deb 100%[======================================================================>] 266.91K --.-KB/s in 0.1s

2024-07-27 20:16:49 (2.08 MB/s) - ‘tzdata_2024a-2ubuntu1_all.deb’ saved [273318/273318]

Then I tried to install the package...

# sudo dpkg -i /tmp/tzdata_2024a-2ubuntu1_all.deb

Selecting previously unselected package tzdata.
(Reading database ... 156510 files and directories currently installed.)
Preparing to unpack .../tzdata_2024a-2ubuntu1_all.deb ...
Unpacking tzdata (2024a-2ubuntu1) over (2024a-0ubuntu0.22.04.1) ...
Setting up tzdata (2024a-2ubuntu1) ...
dpkg: error processing package tzdata (--install):
 installed tzdata package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 tzdata

Since that one didn't work, I deleted tzdata*.deb from /tmp and downloaded the Debian package from a different mirror/source...

# wget http://mirrors.cat.pdx.edu/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb

--2024-07-27 20:45:19--  http://mirrors.cat.pdx.edu/ubuntu/pool/main/t/tzdata/tzdata_2024a-2ubuntu1_all.deb
Resolving mirrors.cat.pdx.edu (mirrors.cat.pdx.edu)... 131.252.208.20
Connecting to mirrors.cat.pdx.edu (mirrors.cat.pdx.edu)|131.252.208.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 273318 (267K) [application/octet-stream]
Saving to: ‘tzdata_2024a-2ubuntu1_all.deb’

tzdata_2024a-2ubuntu1_all.deb 100%[======================================================================>] 266.91K 1.55MB/s in 0.2s

2024-07-27 20:45:20 (1.55 MB/s) - ‘tzdata_2024a-2ubuntu1_all.deb’ saved [273318/273318]

And tried to install this one...

# sudo dpkg -i /tmp/tzdata_2024a-2ubuntu1_all.deb

(Reading database ... 155389 files and directories currently installed.)
Preparing to unpack .../tzdata_2024a-2ubuntu1_all.deb ...
Unpacking tzdata (2024a-2ubuntu1) over (2024a-2ubuntu1) ...
Setting up tzdata (2024a-2ubuntu1) ...
dpkg: error processing package tzdata (--install):
 installed tzdata package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 tzdata

I'm not sure what to try next. Any help is appreciated.

Shane
  • 101
  • 5

2 Answers2

4

I appreciate the links. They didn't directly help, but they gave me ideas for additional search strings that eventually found a page on StackOverflow. I did the steps from one of the comments that allowed Ubuntu to resume updating/upgrading. https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive

Here are the steps that cleared the error...

ln -fs /usr/share/zoneinfo/America/Chicago /etc/localtime

followed by...

DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata

I can now run sudo apt-get upgrade with no errors or warnings.

Thanks again!

Shane
  • 101
  • 5
0

I got the same error messages and tried the same steps as the OP, but to no avail. While digging through the system, I noticed there are two different timezone configuration files under /etc, namely:

  • /etc/localtime
  • /etc/timezone

While the first was pointing to /usr/share/zoneinfo/Host, the second simply consisted of "Etc/UTC". The content of the Host file was identical with Europe/Berlin, but pointing both configuration files to the Host file did not work.

So I removed both configuration files/links and pointed both to /usr/share/zoneinfo/Etc/UTC and could run the upgrade successfully again:

cd /etc
rm ./localtime
mv ./timezone ./timezone.backup
ln -fs /usr/share/zoneinfo/Etc/UTC ./localtime
ln -fs /usr/share/zoneinfo/Etc/UTC ./timezone
apt-get upgrade

I guess the root cause was that the two configuration files were inconsistent with each other and both timezone files (Host as well as Europe/Berlin) were corrupt.

fuggi
  • 691