Failed To Initialize Macports Sqlite Error
Contents |
SCAP-on-Apple SmartCard Services WebKit XQuartz Contact Terms of Use Privacy Policy All user-submitted text and content on this website is licensed under a Creative Commons Attribution 2.5 License unless otherwise noted. Copyright © 2011 database disk image is malformed macports Apple Inc. All rights reserved. New Ticket Tickets Wiki failed to initialize macports os platform mismatch Browse Source Timeline Roadmap Ticket Reports Search Search: Context Navigation ←
Uninstall Macports
Previous TicketNext Ticket → Ticket #32686 (closed defect: fixed) Opened 5 years ago Last modified 18 months ago Registry DB corrupted after selfupdate Reported by: falkschramm@… Owned by: macports-tickets@… Priority: Normal Milestone: Component: base Version: 2.0.3 Keywords: lack-of-interest Cc: pixilla@…, cal@…, evandrix@… Port: Description (last modified by ryandesign@…) (diff) Hi there, After running "port selfupdate" today the registry DB seems to be corrupted. Before "port list outdated" was running fine. After the selfupdate it fails with the following error message: Error: /opt/local/bin/port: port installed failed: sqlite error: SQL logic error or missing database (1) while executing query: SELECT name FROM registry.ports WHERE id=572 Looking into the /opt/local/var/macports/registry/registry.db file with sqlite3 the file seems to be corrupted: sqlite> SELECT id FROM ports; Fails after ID 571 with "Error: database disk image is malformed". So far it seems that the selfupdate corrupted the registry.db file. Is there any way to rebuild/reconstruct the file? Thanks in advance, Falk Change History comment:1 Changed 5 years ago by falkschramm@… Cc falkschramm@… added Cc Me! comment:2 Changed 5 years ago by ryandesign@… Cc falkschramm@… removed Component changed from ports to base Description modified (diff) I don't know why your registry corrupted, nor how to fix it. But I do want to point out that "port list" doesn't do what you think it does. comment:3 Changed 5 years ago by pixilla@… Cc pixilla@… added Looks similar to a recent experience of mine. macports-dev@lists: MP trunk sql.c COLLATE VERSION comment:4 Changed 5 years ago by pixilla@… If you have a registry.db-journal file recovery should be automatic. $ cd /opt/local/var/macports/registry $ ls registry.db-journal $ sudo sqlite3 registry.db sqlite> .tables sqlite> SELECT id FROM ports; sqlite> .quit comment:5 follow-up: ↓ 6 Changed 5 years ago by ecronin@… Automatic if the process has write access to registry.db, which it doesn't if you're doing 'port out
SCAP-on-Apple SmartCard Services WebKit XQuartz Contact Terms of Use Privacy Policy All user-submitted text and content on this website is licensed under a Creative Commons Attribution 2.5 License unless otherwise noted. Copyright © 2011 Apple Inc. All rights reserved. New Ticket Tickets Wiki Browse Source Timeline Roadmap Ticket Reports Search Search: Context Navigation ← Previous TicketNext Ticket → Ticket #51764 (closed defect: invalid) Opened 3 months ago Last modified 3 https://trac.macports.org/ticket/32686 months ago MacPorts reinstall : problem, sqlite error: database disk image is malformed Reported by: gwilom@… Owned by: macports-tickets@… Priority: Normal Milestone: Component: base Version: 2.3.4 Keywords: Cc: Port: Description Hello, 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 https://trac.macports.org/ticket/51764 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. Change History comment:1 Changed 3 months ago by mf2k@… Status changed from new to closed Resolution set to invalid Component changed from ports to base Trac is not for tech s
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting http://apple.stackexchange.com/questions/201237/macports-not-working-after-power-outage-during-build-sqlite-disk-i-o-error ads with us Ask Different Questions Tags Users Badges Unanswered Ask Question _ Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top MacPorts not working after power outage during build (sqlite disk I/O error) up vote 0 down vote favorite I was building failed to packages in MacPorts on a Mac Mini when the power went out. Now anything I try to do in MacPorts (install, clean, selfupdate) results in the following error: sqlite error: disk I/O error (3850) 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: disk I/O error (3850) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry How can I fix this? macports failed to initialize sqlite share|improve this question asked Aug 20 '15 at 18:10 Brian McCutchon 1156 I would restore from backup as a fie is corrupt and that file depends on the pros you have installed and can't be reproduced from a new install –Mark Aug 20 '15 at 18:16 @Mark I don't have any backups for this particular machine. Any other ideas? –Brian McCutchon Aug 20 '15 at 18:18 The way to reinstall macports is to have a list of the ports you installed and then redo - to get the list of pros you need that db. So no - just take this as a learning moment and realise you need backups. You can reinstall macports from scratch if you know which ones you need –Mark Aug 20 '15 at 19:31 @Mark Both port list installed and port -qv installed result in the same error. Is there a way to get a list of installed ports outside of macports? –Brian McCutchon Aug 20 '15 at 19:52 No as that list is held in the database that is corrupted. –Mark Aug 20 '15 at 19:54 | show 1 more comment 1 Answer 1 active oldest votes up vote 0 down vote accepted The fix for this is actually quite simple, and is mentioned in this MacPorts issue. From a comment on the issue by "pixilla@…": $ cd /opt/local/var/macports/registry $ ls registry.db-journal $ sudo sqlite3 registry.db sqlite> .tables