MacPorts reinstall : problem, sqlite error: database disk image is malformed

guillaume trebuchet guillaume.trebuchet at gmail.com
Wed Jul 6 00:54:45 PDT 2016


Hello,

My configuration: MacOS El Capitain 10.11.5, I can’t access to the port version but I suppose I is the last one...

Due to a premature shutdown of my computer (battery), my macport registry
is malformed :
I execute :
{{{
sudo port selfupdate
}}}
and it the result
{{{
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 610)
   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 it possible to repair the database or reinstall port (the uninstall
procedure doesn't work because of the registry problem) ?

for information, i try :
{{{
sudo port -fp uninstall installed
}}}
And this is the result :
{{{
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 610)
   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
}}}


Thanks for the help.


More information about the macports-users mailing list