<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pkg on inetshell</title><link>https://inet.sh/en/tags/pkg/</link><description>Recent content in Pkg on inetshell</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 25 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://inet.sh/en/tags/pkg/index.xml" rel="self" type="application/rss+xml"/><item><title>pfSense: ld-elf.so.1: Shared object "libssl.so.30" not found, required by "pkg"</title><link>https://inet.sh/en/posts/pfsense/libssl-so-30-not-found-pkg/</link><pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate><guid>https://inet.sh/en/posts/pfsense/libssl-so-30-not-found-pkg/</guid><description>pkg update and the pfSense Package Manager die with &amp;#39;Shared object libssl.so.30 not found, required by pkg&amp;#39;: the pkg binary got linked against an OpenSSL the base system does not have yet. Recovery with pkg-static (certctl rehash, reinstall pkg, pfSense-repo and pfSense-upgrade) and how to finish the upgrade properly.</description><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2>
<p>From the console (option 8) or <strong>Diagnostics → Command Prompt</strong>:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">certctl rehash
</span></span><span class="line"><span class="cl">pkg-static clean -ay
</span></span><span class="line"><span class="cl">pkg-static install -fy pkg
</span></span><span class="line"><span class="cl">pkg-static install -xfy pfSense-repo pfSense-upgrade
</span></span><span class="line"><span class="cl">pkg-static update -f
</span></span><span class="line"><span class="cl">pfSense-upgrade -d -c        <span class="c1"># shows which version the configured branch offers</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>With <code>pkg</code> alive again, finish the pending upgrade through <strong>System → Update</strong> (or <code>pfSense-upgrade -d</code>), not with <code>pkg upgrade</code>.</p>
<h2 id="the-error">The error</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">ld-elf.so.1: Shared object &#34;libssl.so.30&#34; not found, required by &#34;pkg&#34;
</span></span></code></pre></td></tr></table>
</div>
</div><p>You see it on <code>pkg update</code>, when installing a package, or indirectly: <strong>System → Package Manager</strong> shows up empty and <strong>System → Update</strong> cannot check versions. Sometimes the binary complaining is <code>pfSense-repoc</code> instead of <code>pkg</code>; it is the same problem.</p>
<h2 id="why-it-happens">Why it happens</h2>
<p>pfSense is FreeBSD, and <code>pkg</code> is a binary dynamically linked against the system&rsquo;s <code>libssl</code>. When the configured repository belongs to a pfSense release built on a newer FreeBSD, its packages come linked against a newer OpenSSL (<code>libssl.so.30</code> = OpenSSL 3). If <code>pkg</code>, or <code>pfSense-repoc</code>, gets updated from that repo <strong>before</strong> the base system, the new binary asks for a library that does not exist on your install yet.</p>
<p>How you get there:</p>
<ul>
<li>A manual <code>pkg upgrade</code> from the shell. On pfSense you never do that.</li>
<li>Installing or reinstalling a package after switching the <strong>Branch</strong> in System → Update to a higher version, without upgrading.</li>
<li>An upgrade interrupted halfway (typical in the 2.7.0 → 2.7.1/2.7.2 jump, when the base moved to OpenSSL 3).</li>
<li>On pfSense Plus, rolling back to an older boot environment with the repo pointing at the new one (Redmine #15070).</li>
</ul>
<p>The library name will change across releases; the mechanics and the fix stay the same.</p>
<h2 id="fix">Fix</h2>
<p><code>pkg-static</code> is the statically linked copy of <code>pkg</code>: it needs no <code>libssl</code>, which is why it works when <code>pkg</code> does not.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># 1. Let pkg-static talk TLS to the repo (holds until the next reboot)</span>
</span></span><span class="line"><span class="cl">certctl rehash
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 2. Drop the cache and reinstall pkg and the repo configuration</span>
</span></span><span class="line"><span class="cl">pkg-static clean -ay
</span></span><span class="line"><span class="cl">pkg-static install -fy pkg
</span></span><span class="line"><span class="cl">pkg-static install -xfy pfSense-repo pfSense-upgrade   <span class="c1"># -x: regex, so pfSense-repoc comes along</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 3. Refresh metadata and check</span>
</span></span><span class="line"><span class="cl">pkg-static update -f
</span></span><span class="line"><span class="cl">pfSense-upgrade -d -c
</span></span></code></pre></td></tr></table>
</div>
</div><p>If <code>pkg-static update</code> still fails, <code>pkg-static -d update</code> prints the full trace (certificates, DNS, wrong branch).</p>
<p>Before step 3 check the <strong>Branch</strong> under System → Update: it must be the version you want to reach, not an intermediate one. And finish the job through the GUI or with <code>pfSense-upgrade -d</code>: a stray <code>pkg upgrade</code> leaves you halfway again.</p>
<p>If the base system is so mixed up that even this does not fly, Netgate&rsquo;s documented last resort is <code>pkg-static upgrade -f</code> (reinstalls everything), followed by a reboot.</p>
<h2 id="traps">Traps</h2>
<ul>
<li><strong><code>pkg upgrade</code> does not exist on pfSense.</strong> The only supported path is System → Update / <code>pfSense-upgrade</code>. This whole situation is born from skipping it.</li>
<li><strong>Backup first</strong>: Diagnostics → Backup &amp; Restore. On ZFS, also a boot environment (System → Boot Environments) lets you roll back in one reboot.</li>
<li><strong>Do not copy <code>libssl.so.30</code> from another FreeBSD.</strong> It circulates as a trick; it leaves the system with libraries from two releases and breaks the next upgrade.</li>
<li><strong>Packages first, no.</strong> With an upgrade pending, upgrade the system and then install packages, not the other way around.</li>
<li>The repo and the upgrade use HTTPS: if <code>certctl rehash</code> is not enough, check the firewall&rsquo;s system time and DNS.</li>
</ul>
<p>Reference: <a href="https://docs.netgate.com/pfsense/en/latest/troubleshooting/upgrades.html">Upgrade Troubleshooting</a> in the Netgate documentation.</p>
]]></content:encoded></item></channel></rss>