<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pkg sqlite issue]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I have an issue with pkg. I tried to install some extra packages from freebsd using pkg as explain here : https://doc.pfsense.org/index.php/Installing_FreeBSD_Packages</p>
<p dir="auto">On one pfsense box, the "pkg" command failed with an sqlite error (I no longer have the exact error msg, sry).</p>
<p dir="auto">Now:<br />
"pkg" command does nothing (no output)<br />
"pkg update" seems to work fine (normal output, no error message)<br />
"pkg install XXX" always say that package XXX does not exist.</p>
<p dir="auto">I'm stuck. how can I reset the pkg config/database (or the whole pkg package?) and restart the pkg setup/update process?</p>
<p dir="auto">(pfsense version : 2.2.2 i386 nanobsd)</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netgate.com/topic/83675/pkg-sqlite-issue</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 13:57:42 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/83675.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 May 2015 10:20:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pkg sqlite issue on Mon, 11 May 2015 10:15:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/doktornotor">@<bdi>doktornotor</bdi></a>:</p>
<blockquote>
<p dir="auto">I think you can try to nuke /var/db/pkg and run <em>pkg update</em> - then you'll run into issues with files from packages that already exist but the pkg does not know about them, that is if you actually managed to install something before</p>
</blockquote>
<p dir="auto">I just tried and it works well !! Thank you !!</p>
]]></description><link>https://forum.netgate.com/post/543351</link><guid isPermaLink="true">https://forum.netgate.com/post/543351</guid><dc:creator><![CDATA[geminux]]></dc:creator><pubDate>Mon, 11 May 2015 10:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Pkg sqlite issue on Fri, 08 May 2015 09:25:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/geminux">@<bdi>geminux</bdi></a>:</p>
<blockquote>
<p dir="auto">I'm stuck. how can I reset the pkg config/database (or the whole pkg package?) and restart the pkg setup/update process?</p>
</blockquote>
<p dir="auto">+1. It's just unbelivable. I ended up with pkg that thinks it's installed but it's not - see https://redmine.pfsense.org/issues/4670</p>
<p dir="auto">First the PBI überjunk, now this. Is there really noone in FreeBSD that could produce some package manager that's not braindead? I think you can try to nuke /var/db/pkg and run <em>pkg update</em> - then you'll run into issues with files from packages that already exist but the pkg does not know about them, that is if you actually managed to install something before. This seems to be an issue even with the bootstrapped pkg itself, so even if you did not manage to install anything yet. Did not have time to play with that yet since I've filed the bug.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/geminux">@<bdi>geminux</bdi></a>:</p>
<blockquote>
<p dir="auto">I think I tried to run the pkg command while pfsense was in the process of of re-installing packages</p>
<p dir="auto">Any clue ?</p>
</blockquote>
<p dir="auto">Unlikely. 2.2.x uses the <a href="https://forum.pfsense.org/index.php?topic=90798.0" target="_blank" rel="noopener noreferrer nofollow ugc">PBI garbage</a> for the packages you install from System - Packages. Not pkg(ng).</p>
<p dir="auto">Good luck.</p>
]]></description><link>https://forum.netgate.com/post/542733</link><guid isPermaLink="true">https://forum.netgate.com/post/542733</guid><dc:creator><![CDATA[doktornotor]]></dc:creator><pubDate>Fri, 08 May 2015 09:25:32 GMT</pubDate></item><item><title><![CDATA[Reply to Pkg sqlite issue on Mon, 04 May 2015 08:39:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I finaly find the initial error message :</p>
<pre><code>pkg install gsed bash nano
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    5 MiB   1.3MB/s    00:04    
Processing entries: 100%
FreeBSD repository update completed. 23936 packages processed.
pkg: sqlite error while executing INSERT INTO pkg_search SELECT id, name || '-' || version, origin FROM packages;CREATE INDEX packages_origin ON packages(origin COLLATE NOCASE);CREATE INDEX packages_name ON packages(name COLLATE NOCASE);CREATE INDEX packages_uid_nocase ON packages(name COLLATE NOCASE, origin COLLATE NOCASE);CREATE INDEX packages_version_nocase ON packages(name COLLATE NOCASE, version);CREATE INDEX packages_uid ON packages(name, origin);CREATE INDEX packages_version ON packages(name, version);CREATE UNIQUE INDEX packages_digest ON packages(manifestdigest); in file pkgdb.c:2333: disk I/O error
pkg: sqlite error while executing RELEASE SAVEPOINT REPO in file pkgdb.c:1170: no such savepoint: REPO
Unable to update repository FreeBSD
All repositories are up-to-date.
pkg: sqlite error while executing SELECT count(name) FROM sqlite_master WHERE type='table' AND name='repodata'; in file pkgdb.c:2358: database is locked
Repository FreeBSD contains no repodata table, need to re-create database
pkg: Repository FreeBSD cannot be opened. 'pkg update' required
pkg: Cannot get an advisory lock on a database, it is locked by another process

</code></pre>
<p dir="auto">I think I tried to run the pkg command while pfsense was in the process of of re-installing packages</p>
<p dir="auto">Any clue ?</p>
]]></description><link>https://forum.netgate.com/post/541736</link><guid isPermaLink="true">https://forum.netgate.com/post/541736</guid><dc:creator><![CDATA[geminux]]></dc:creator><pubDate>Mon, 04 May 2015 08:39:40 GMT</pubDate></item></channel></rss>