getaddrinfo failed - Name or service not known

Tom H tomh0665 at gmail.com
Tue Nov 19 15:27:35 UTC 2013


On Tue, Nov 19, 2013 at 2:37 PM, Unga <unga888 at yahoo.com> wrote:


>> 2) When you say "mount the devfs on chroot/dev" do you mean to
>> bind-mount "/dev" on "$chroot/dev"?
>
> cd chroot_dir
> mount -o bind /proc proc/
> mount -o bind /dev dev/
> mount -o bind /sys sys/

So I don't understand your previous devfs question.


> /usr/sbin/myServer
>
> The getaddrinfo simply does not work inside the chroot.

I assume that it works outside the chroot so you could strace and ldd
it to check that you have the right files and libraries inside the
chroot.

Offhand, you might need, file-wise, to add one or more of
"/etc/{gai,host,nsswitch}.conf" to your previous list of three for
getaddrinfo to function on Linux; but it's just a guess.




More information about the ubuntu-users mailing list