Opened 9 years ago

Closed 8 years ago

#36126 closed defect (worksforme)

Registry DB error - update failure

Reported by: meng.uom@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Schmidt))

Hi, I wanted to update macports today, but got the following error message:

sqlite error: database disk image is malformed (11) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry
    while executing
"registry::open $db_path"
    (procedure "mportinit" line 633)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, sqlite error: database disk image is malformed (11) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry

Is there any way to fix this issue?

Many thanks. :D

Sofia.

Change History (5)

comment:1 Changed 9 years ago by ryandesign (Ryan Schmidt)

Component: portsbase
Description: modified (diff)
Keywords: update failure removed
Port: registry DB removed

comment:2 Changed 9 years ago by ryandesign (Ryan Schmidt)

Type: updatedefect

comment:3 Changed 9 years ago by neverpanic (Clemens Lang)

I'm afraid there's probably no way to fix this. If you have a backup, try restoring /opt/local/var/macports/registry/registry.db. If you don't have a backup you'll probably need a re-install.

comment:4 Changed 9 years ago by pixilla (Bradley Giesbrecht)

I have had some luck in the past open the db with sqlite and letting it repair what it knows how to repair.

This has worked for me in the past:

$ sudo sqlite3 /opt/local/var/macports/registry/registry.db
SQLite version 3.7.14 2012-09-03 15:42:36
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit
$

comment:5 Changed 8 years ago by neverpanic (Clemens Lang)

Resolution: worksforme
Status: newclosed

There's nothing we can do about this, unfortunately.

Note: See TracTickets for help on using tickets.