[Nix-dev] name resolution in nix packages not working

Tobias Hammerschmidt tobias.hammerschmidt at gmx.de
Fri Sep 14 15:21:53 CEST 2007


Eelco Dolstra schrieb:
> Tobias Hammerschmidt wrote:
> 
>> Hm strange I'm unable to install curl from Nixpkgs. This is the output
>> when running nix-env -i curl:
> ...
>> curl: (6) Couldn't resolve host 'nix.cs.uu.nl'
>>
>> trying http://curl.haxx.se/download/curl-7.16.2.tar.bz2
>>
>> curl: (6) Couldn't resolve host 'curl.haxx.se'
> 
> Doh! Here's it's using a curl from Nixpkgs, so if there is some problem with
> resolving then that curl won't work.  (OTOH, "download-using-manifests" uses
> whatever curl Nix's configure script detected, probably /usr/bin/curl.)
> 
> In any case, you already have a curl:
> /nix/store/ipqqrbwm3n9m15vny2kipx40pj25ahml-curl-7.16.2/bin/curl, you can do the
> strace on that one.
> 
> (I don't quite understand why it would try to download the curl tarball though...)
> 
I attached the complete strace -- the part you mentioned looks like this:

open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=503, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0xb7c25000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 503
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7c25000, 4096)                = 0
getpid()                                = 32627
open("/etc/resolv.conf", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0xb7c25000
read(3, "#search gilead\nnameserver 141.57"..., 4096) = 62
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7c25000, 4096)                = 0
uname({sys="Linux", node="cort", ...})  = 0
open("/nix/store/ipqqrbwm3n9m15vny2kipx40pj25ahml-curl-7.16.2/lib/libnss_files.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/nix/store/71dwiz8hfmx8ygyl5lm7s1dpm1jxvim0-zlib-1.2.3/lib/libnss_files.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/nix/store/brba7k7qrpk7r8qnha6hf1pr46rkmvzc-glibc-2.5/lib/libnss_files.so.2", 
O_RDONLY) = 3

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nix-curl.strace
Url: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20070914/556d21d0/attachment.pl 


More information about the nix-dev mailing list