Skip to content

ack installs, but reports "use: command not found" #47302

@Calvin-L

Description

@Calvin-L

Issue description

The ack tool can be installed, but reports errors like "use: command not found". These errors are symptoms of trying to execute a Perl script with Bash; I am not sure why the shebang line in the ack script is not working.

(Also, unrelated: while nix-shell -p ack works, nix-env -i ack instead reports "error: selector 'ack' matches no derivations". Perhaps I have some misunderstanding about what the arguments to these commands mean.)

Steps to reproduce

$ nix-shell --pure -p ack
$ ack --help
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 3: use: command not found
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 4: use: command not found
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 5: our: command not found
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 7: use: command not found
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 8: syntax error near unexpected token `('
/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack: line 8: `use Getopt::Long 2.38 ();'

Shebang line

$ type ack
ack is /nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack
$ head -n1 /nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/bin/ack
#!/nix/store/xhir85mv5mfwdkbisnx3bl9h6agjmix4-perl-5.28.0/bin/perl -I/nix/store/xhir85mv5mfwdkbisnx3bl9h6agjmix4-perl-5.28.0/lib/perl5/site_perl -I/nix/store/fm5qg2kljrks0m5jbba6f69ik4vad3bv-perl5.28.0-File-Next-1.16/lib/perl5/site_perl -I/nix/store/xhir85mv5mfwdkbisnx3bl9h6agjmix4-perl-5.28.0/lib/perl5/site_perl -I/nix/store/fm5qg2kljrks0m5jbba6f69ik4vad3bv-perl5.28.0-File-Next-1.16/lib/perl5/site_perl -I/nix/store/xhir85mv5mfwdkbisnx3bl9h6agjmix4-perl-5.28.0/lib/perl5/site_perl -I/nix/store/fm5qg2kljrks0m5jbba6f69ik4vad3bv-perl5.28.0-File-Next-1.16/lib/perl5/site_perl -I/nix/store/q82s26mj9z0j29kcd2w31ykssd9nc67b-perl5.28.0-ack-2.24/lib/perl5/site_perl

Technical details

  • system: "x86_64-darwin"
  • host os: Darwin 17.7.0, macOS 10.13.6
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.1.1
  • channels(cloncari): "nixpkgs-19.03pre153206.f753852e11d"
  • nixpkgs: /Users/cloncari/.nix-defexpr/channels/nixpkgs

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: darwinRunning or building packages on Darwin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions