I just encountered this problem and it was the result of a malformed
packagekit transaction database :

roberto-pc:~# apt-get install --reinstall libapt-pkg5.0 apt apt-utils 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 0 not upgraded.
Need to get 2,558 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian stretch/main amd64 libapt-pkg5.0 amd64 
1.4.7 [916 kB]
Get:2 http://ftp.us.debian.org/debian stretch/main amd64 apt amd64 1.4.7 [1,231 
kB]
Get:3 http://ftp.us.debian.org/debian stretch/main amd64 apt-utils amd64 1.4.7 
[410 kB]
Fetched 2,558 kB in 0s (49.9 MB/s) 
(Reading database ... 277322 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.4.7_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.4.7) over (1.4.7) ...
Setting up libapt-pkg5.0:amd64 (1.4.7) ...
(Reading database ... 277322 files and directories currently installed.)
Preparing to unpack .../archives/apt_1.4.7_amd64.deb ...
Unpacking apt (1.4.7) over (1.4.7) ...
Setting up apt (1.4.7) ...
(Reading database ... 277322 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.4.7_amd64.deb ...
Unpacking apt-utils (1.4.7) over (1.4.7) ...
Setting up apt-utils (1.4.7) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Error: Timeout was reached
roberto-pc:~# apt-get update
Ign:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org/ stretch/updates InRelease
Hit:3 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.us.debian.org/debian stretch Release
Error: Timeout was reached  
Reading package lists... Done
roberto-pc:~# /usr/lib/packagekit/packagekitd --verbose
17:55:56        PackageKit          Verbose debugging enabled (on console 1)
17:55:56        PackageKit          daemon shutdown set to 0 seconds
17:55:56        PackageKit          clearing download cache at 
/var/cache/PackageKit/downloads
17:55:56        PackageKit          setting config file watch on 
/etc/PackageKit/PackageKit.conf
17:55:56        PackageKit          Trying to load : aptcc
17:55:56        PackageKit          dlopening 
'/usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so'
17:55:57        PackageKit          trying to open database 
'/var/lib/PackageKit/transactions.db'
17:55:57        PackageKit          creating table to repair: Failed to execute 
statement 'SELECT * FROM transactions LIMIT 1': database disk image is malformed
Failed to load the backend: Failed to execute statement 'CREATE TABLE 
transactions (transaction_id TEXT PRIMARY KEY,timespec TEXT,duration 
INTEGER,succeeded INTEGER DEFAULT 0,role TEXT,data TEXT,description TEXT,uid 
INTEGER DEFAULT 0,cmdline TEXT);': table transactions already 
existsroberto-pc:~# 
roberto-pc:~# rm -f /var/lib/PackageKit/transactions.db
roberto-pc:~# apt-get update
Ign:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org/ stretch/updates InRelease
Hit:3 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.us.debian.org/debian stretch Release
Reading package lists... Done
roberto-pc:~# apt-get update


I got the idea to check from here:
https://fanf42.blogspot.com/2014/08/upgrading-to-ubuntu-1404-error-timeout.html

This could really use a better/more robust error message.

Regards,

-Roberto
-- 
Roberto C. Sánchez

Attachment: signature.asc
Description: Digital signature

Reply via email to