[Nix-dev] nixops "No such file or directory" after creation

Wout Mertens wout.mertens at gmail.com
Wed Aug 20 20:38:32 CEST 2014


Just create a wrapper for nixops that calls "nix-shell --pure -p nix -p
nixos --command nixops"?

Wout.
On Aug 20, 2014 6:56 PM, "Richard Wallace" <rwallace at thewallacepack.net>
wrote:

> Aha! Because I started with `nix-shell --pure -p nixops` none of the nix
> commands were in my $PATH and I didn't even realize it.  That fixed it.
>
> I'd like to avoid needing to use nix-shell to use nixops, but when I try
> to use nixops from my regular shell I get
>
> $ nixops list
> Traceback (most recent call last):
>   File
> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped",
> line 5, in <module>
>     from nixops import deployment
>   File
> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py",
> line 5, in <module>
>     import subprocess
>   File
> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py",
> line 430, in <module>
>     import pickle
>   File
> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/pickle.py",
> line 34, in <module>
>     import struct
>   File
> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/struct.py",
> line 1, in <module>
>     from _struct import *
> ImportError:
> /nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/lib-dynload/_struct.so:
> undefined symbol: PyUnicodeUCS2_AsEncodedString
>
> If someone could tell me how to fix that I would be extremely happy. :)
>
> Thanks,
> Rich
>
>
> On Wed, Aug 20, 2014 at 9:46 AM, Domen Kožar <domen at dev.si> wrote:
>
>> nix-instantiate is missing in your $PATH.
>>
>>
>> On Wed, Aug 20, 2014 at 6:28 PM, Richard Wallace <
>> rwallace at thewallacepack.net> wrote:
>>
>>> Yes, sorry, I meant to do that and then completely forgot.
>>>
>>> $ nixops info --debug -d d397269c-27fb-11e4-96b7-d1c68637124d
>>> Traceback (most recent call last):
>>>   File
>>> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped",
>>> line 855, in <module>
>>>     args.op()
>>>   File
>>> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped",
>>> line 192, in op_info
>>>     do_eval(depl)
>>>   File
>>> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/bin/..nixops-wrapped-wrapped",
>>> line 139, in do_eval
>>>     depl.evaluate()
>>>   File
>>> "/nix/store/lx8n1wija7n0mijpq0p3g0sj0ymnvw2k-nixops-1.2/lib/python2.7/site-packages/nixops/deployment.py",
>>> line 291, in evaluate
>>>     "-A", "info"], stderr=self.logger.log_file)
>>>   File
>>> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py",
>>> line 566, in check_output
>>>     process = Popen(stdout=PIPE, *popenargs, **kwargs)
>>>   File
>>> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py",
>>> line 710, in __init__
>>>     errread, errwrite)
>>>   File
>>> "/nix/store/rr4vmi7zzbximnrfj7czya1wy4k0ii9d-python-2.7.8/lib/python2.7/subprocess.py",
>>> line 1327, in _execute_child
>>>     raise child_exception
>>> OSError: [Errno 2] No such file or directory
>>>
>>>
>>>
>>> On Wed, Aug 20, 2014 at 9:26 AM, Eelco Dolstra <
>>> eelco.dolstra at logicblox.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> On 20/08/14 18:21, Richard Wallace wrote:
>>>>
>>>> > It looks like there is a python library that isn't being found.  Not
>>>> sure why
>>>> > that would be though. Any ideas?
>>>>
>>>> Can you invoke nixops with --debug? That should print a stack trace
>>>> showing the
>>>> location of the exception.
>>>>
>>>> --
>>>> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
>>>>
>>>
>>>
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>>
>>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140820/2ca22c1d/attachment.html 


More information about the nix-dev mailing list