Jeremy Lavergne jeremy at
Sun Oct 21 18:35:23 PDT 2012

> I believe my computer then shut down for no reason, it didn't lose power.

Sounds like your computer may have overheated.

> Error: Unable to execute port: sqlite error: database disk image is malformed (11) while executing query: SELECT state FROM registry.ports WHERE id=105

I suspect your best result will be to dump out the database to a text file and then read it back in. The database is powered by sqlite3, so it's something along the following lines (Google probably will get you far as well).

Dump the db:
sqlite3 /opt/local/var/macports/registry/registry.db
sqlite> .mode insert
sqlite> .output dump_all.sql
sqlite> .dump

Create a new db:
sqlite3 registry.db
sqlite> .read dump_all.sql

Replace the old db:
sudo cp registry.db /opt/local/var/macports/registry/registry.db

On my system, the registry.db is owned by root:admin with permissions 0644.

More information about the macports-users mailing list