[FreeBSD-update]Installing updates…install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory

When I tried to upgrade my FreeBSD system today, I received a last minute Christmas gift from the FreeBSD team. 🙂

#sudo freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 8.2-RELEASE from update4.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be added as part of updating to 8.2-RELEASE-p5:
/usr/src/lib/libc/gen/libc_dlopen.c

I got the following error:

#sudo freebsd-update install
Installing updates...install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory
 done.

Initially, I thought the problem was a typo in the freebsd-update profile, so I gave this a try:

sudo cat /var/db/freebsd-update/* | grep libc_dlopen.c

Unfortunately, I couldn’t find anything. So I investigated the problem, and I found that it was caused by the missing source. In a nut shell, if you did not install the FreeBSD with the source (i.e., /usr/src is empty), this problem will show up.

To fix this problem, simply create a dummy directory:

sudo mkdir -p /usr/src/lib/libc/gen

and re-run everything once again, i.e.,

#sudo freebsd-update fetch
#sudo freebsd-update install
#sudo reboot

After the computer finishes rebooting, verify that the upgrade is done:

# sudo freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 8.2-RELEASE from update2.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 8.2-RELEASE-p5.

That’s it!

Enjoy this last minute Christmas gift from the FreeBSD team. Merry Christmas! 🙂

–Derrick

Our sponsors:

10 Replies to “[FreeBSD-update]Installing updates…install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory”

  1. Mark

    Thanks for the clear advice. I’m a BSD noob coming across from Linux so this had me puzzled until I read your fix – cheers

    Reply
  2. Pingback: Upgrade FreeBSD « Blackstreetnight's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *