Forgot to rebuild third-party software. Now what?

258 views
Skip to first unread message

Tom Limoncelli

unread,
Oct 10, 2016, 3:47:54 PM10/10/16
to freebsd-...@freebsd.org
I've upgraded my system from 10.3 to 11.0-RELEASE and I forgot to rebuild
third-party software. Now various shared libraries don't exist.

Longer version...

I was following the usual steps:

# : > /usr/bin/bspatch
# freebsd-update upgrade -r 11.0-RELEASE
# freebsd-update install
<reboot the system>
# freebsd-update install
<rebuild third-party software> <<<< Didn't do this part.
# freebsd-update install

The steps looked like this:

root@exit148:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Installing updates...
Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/usr/sbin/freebsd-update
install"
again to finish installing updates.
root@exit148:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Installing updates... done.
root@exit148:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.

Now I can't run pkg:

$ sudo pkg upgrade
sudo: error in /usr/local/etc/sudo.conf, line 0 while loading plugin
`sudoers_policy'
sudo: unable to load /usr/local/libexec/sudo/sudoers.so: Shared object
"libpam.so.5" not found, required by "sudoers.so"
sudo: fatal error, unable to load plugins

Oops! I just realized that sudo is a third-party software package. If I
become root some other way:

# pkg upgrade
Shared object "libssl.so.7" not found, required by "pkg"

Interestingly enough, Apache HTTPd is running and my website is up.

Suggestions on how to get out of this corner? I'm pretty stuck. I'm not
even sure if I should reboot.

(I do have backups... but given the state of the system, I'd probably have
to restore to a new machine).

Thanks!
Tom

--
Email: t...@whatexit.org Work: tlimo...@StackOverflow.com
Blog: http://EverythingSysadmin.com
_______________________________________________
freebsd-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Matt Smith

unread,
Oct 10, 2016, 4:00:47 PM10/10/16
to Tom Limoncelli, freebsd-...@freebsd.org
On Oct 10 15:47, Tom Limoncelli wrote:
>
>Suggestions on how to get out of this corner? I'm pretty stuck. I'm not
>even sure if I should reboot.
>

Try either running pkg-static instead of just pkg which is statically
linked without any shared libraries. Or alternatively try /usr/sbin/pkg
bootstrap -f which should bootstrap it from the repo.

--
Matt

Tom Limoncelli

unread,
Oct 11, 2016, 8:19:35 AM10/11/16
to Matt Smith, Tom Limoncelli, freebsd-...@freebsd.org
On Mon, Oct 10, 2016 at 3:59 PM, Matt Smith <matt...@gmail.com> wrote:

> On Oct 10 15:47, Tom Limoncelli wrote:
>
>>
>> Suggestions on how to get out of this corner? I'm pretty stuck. I'm not
>> even sure if I should reboot.
>>
>>
> Try either running pkg-static instead of just pkg which is statically
> linked without any shared libraries. Or alternatively try /usr/sbin/pkg
> bootstrap -f which should bootstrap it from the repo.


Wow! That worked great! I did:

# pkg bootstrap -f
# pkg upgrade

Everything is back to normal!

My suggestion is that the upgrade announcement indicate how to rebuild the
third-party software. Listing "pkg upgrade (or the equiv portmaster
command)" would help the average person.

Thanks, Matt! That saved my butt!
Tom
Reply all
Reply to author
Forward
0 new messages