# with freebsd-update install I get -> libc_dlopen.c: No such file or directory



## parcival (Dec 23, 2011)

Hi all,

If I install the latest FreeBSD Security Advisories patches, I get this error message:


```
root@zabbix-m01 ~]# freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 8.2-RELEASE from update5.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

[root@zabbix-m01 ~]# freebsd-update install
Installing updates...install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory
done.
```

Possibly an idea? OS = 8.2-RELEASE-p4
Thanks for any assistance.

parcival


----------



## SirDice (Dec 23, 2011)

Did I miss something? As far as I know 8.2-RELEASE-p4 is the latest. 
There's no mention of any new security advisories on http://www.freebsd.org/security/advisories.html.


----------



## SirDice (Dec 23, 2011)

Oh.. Hahaha.. There are now... 5 to be exact (pam, pam_ssh, telnetd, chroot and bind).

Just wait a few hours or so and try again. You may just have caught the update halfway through.


----------



## parcival (Dec 23, 2011)

hi SIrDice,
To the last 10min there was e.g. this message.


```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

=============================================================================
FreeBSD-SA-11:06.bind                                       Security Advisory
                                                         The FreeBSD Project

Topic:          Remote packet Denial of Service against named(8) servers

Category:       contrib
Module:         bind
Announced:      2011-12-23
Affects:        All supported versions of FreeBSD.
Corrected:      2011-11-17 01:10:16 UTC (RELENG_7, 7.4-STABLE)
               2011-12-23 15:00:37 UTC (RELENG_7_4, 7.4-RELEASE-p5)
               2011-12-23 15:00:37 UTC (RELENG_7_3, 7.3-RELEASE-p9)
               2011-11-17 00:36:10 UTC (RELENG_8, 8.2-STABLE)
               2011-12-23 15:00:37 UTC (RELENG_8_2, 8.2-RELEASE-p5)
               2011-12-23 15:00:37 UTC (RELENG_8_1, 8.1-RELEASE-p7)
               2011-12-01 21:13:41 UTC (RELENG_9, 9.0-STABLE)
               2011-12-01 21:17:59 UTC (RELENG_9_0, 9.0-RC3)
               2011-11-16 23:41:13 UTC (ports tree)
CVE Name:       CVE-2011-4313
```

Possibly an idea to my problem.
What is missing here?


----------



## parcival (Dec 23, 2011)

If I look into the folder, I miss complete /usr/src/lib/libc (without sys). From where do I get that? With another server with complete /usr/src/lib/libc, I did not have problems. Possibly *freebsd-update install* cannot create this missing folder /usr/src/lib/libc/gen/, therefore the error message to these.


----------



## SirDice (Dec 23, 2011)

I'm getting the same error on my VPS. 

That file doesn't exist. I'm guessing it's supposed to be /usr/src/lib/libc/gen/dlopen.c.


----------



## parcival (Dec 23, 2011)

When I create this missing folder, *freebsd-update install* is then successful.


----------



## SirDice (Dec 23, 2011)

It'll still save the wrong file though. On my systems /usr/src/lib/libc/gen/ exists but the libc_dlopen.c does not, I do have a dlopen.c and I assume that's the file they meant to replace.

Now I'm wondering where to report this. I'm not sure a regular PR can be used for this.


----------



## dragona (Dec 23, 2011)

*cvsup also has the same problem*

I used cvsup to get the updates, and buildworld fails too with a similar error.


----------



## SNK (Dec 23, 2011)

SirDice said:
			
		

> It'll still save the wrong file though. On my systems /usr/src/lib/libc/gen/ exists but the libc_dlopen.c does not, I do have a dlopen.c and I assume that's the file they meant to replace.
> 
> Now I'm wondering where to report this. I'm not sure a regular PR can be used for this.



Doesn't libc_dlopen restrict dlopen instead of replacing it? (http://lists.freebsd.org/pipermail/svn-src-head/2011-December/032661.html)


----------



## EricM (Dec 23, 2011)

I got the same error. In my case I did not even have the sources installed, so my /usr/src was empty. The *freebsd-update* seems to try to patch the sources even though I don't have them. The fix is to run this command before running *freebsd-update*:
[cmd=]mkdir -p /usr/src/lib/libc/gen[/cmd]


----------



## Cryptomeria (Dec 24, 2011)

Hi all,

I also got same error.

In my environment, I haven't extracted kernel src.

So, I edited the "Components" option in /etc/freebsd-update.conf like this:


```
userland[164] % diff freebsd-update.conf.old freebsd-update.conf
15c15
< Components src world kernel
---
> Components world kernel
```

I don't understood reason of this error, but this works fine!
--
 Cryptomeria


----------



## gkontos (Dec 24, 2011)

This might clear up some things:



> ```
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> ..... skip ......
> ...



BTW I patched up 6 servers last night, all by building world & kernel with no issues.


----------



## congo (Dec 25, 2011)

I had this problem too, so I put in the gen catalogue and then *freebsd-update install* did complete without errors. However - *uname -mrs*, shows this:

```
FreeBSD 8.2-RELEASE-p3 i386"]
```

Does anybody know what is required for uname to show correct patchlevel of freebsd FreeBSD? -I hope this is not only answered by reboot.


----------



## congo (Dec 25, 2011)

Strange... my code quote was left out of the post:


```
$  uname -mrs
FreeBSD 8.2-RELEASE-p3 i386
```


----------



## Cryptomeria (Dec 26, 2011)

Hi congo,

The freebsd-update command only updates real changed binaries and the uname command shows kernel version only.



			
				congo said:
			
		

> ```
> $  uname -mrs
> FreeBSD 8.2-RELEASE-p3 i386
> ```



In this case, kernel source code wasn't changed, and the system still using old (p3) kernel object. If you want to *new* kernel which has new (p5) one, you can rebuild worlds and kernels. Or, you can check updated version of binaries.

For example, /usr/sbin/named binary was changed in [FreeBSD-SA-11:06.bind]. You can specify changed binaries, at section 2.b) saying.


```
# cd /usr/src
# patch < /path/to/patch
# cd /usr/src/lib/bind/
# make obj && make depend && make && make install
# cd /usr/src/usr.sbin/named
# make obj && make depend && make && make install
```

/usr/src/usr.sbin/named means /usr/sbin/named *must* change.


```
% ls -l `which named`
-r-xr-xr-x  2 root  wheel  1938212 Dec 24 04:00 /usr/sbin/named
```

I found date of this file is newer in advisory, and the object(s) had patched version.


----------



## Lido (Dec 28, 2011)

So, what is the correct fix for this? I'm getting the same error:
	
	



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


----------



## congo (Dec 28, 2011)

Lido said:
			
		

> So, what is the correct fix for this? I'm getting the same error:
> 
> 
> 
> ...



i did:

```
# mkdir -p /usr/src/lib/libc/gen
```

 - then freebsd-update completes without errors. Its a bit of a hack, but it seems to work well.


----------



## ehanneken (Jan 6, 2012)

Lido said:
			
		

> So, what is the correct fix for this?



I think Cryptomeria had the right answer, at least for those of us who don't have source code installed. Edit /etc/freebsd-update.conf, and remove src from the Components list.


----------



## Lido (Jan 7, 2012)

ehanneken, Thanks. I actually don't know if I have source code installed. This was a new install from CD (a few month ago now).


----------



## blodan (Jan 20, 2012)

For those reading through this I can confirm that this solution works fine when building your own kernel from source:


```
mkdir -p /usr/src/lib/libc/gen
freebsd-update fetch
```

freebsd-update will then say:

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

Then just run install as usual:

```
freebsd-update install
```


----------



## setevoy (Feb 22, 2012)

Thanks to all, this:


```
# mkdir -p /usr/src/lib/libc/gen
```

works perfectly.

By the way, I didn't find solution in RU-net, so I copy this to me here.


----------

