-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation fails with empty error message #527
Comments
How much ram do you have? Can you reproduce every run? |
I have 16GB of RAM. I'm able to reproduce the given error every time. |
cc @edolstra any ideas? |
I worked around this issue. It turns out the issue was related to my shell environment. In a file that got sourced by my shell profile I exporting a variable that performs coloring of # STDERR coloring, if available
if [ -f "/usr/lib/libstderred.so" ]; then
export LD_PRELOAD="/usr/lib/libstderred.so"
fi Removing this export allowed me to install nix and successfully use it. I would still consider this a bug, but I consider this issue closed. |
What does |
it colors anything emitted from stderr. https://github.com/sickill/stderred |
I had the same issue, also using libstderred via LD_PRELOAD. Unsetting LD_PRELOAD, as described by @mwilson-ns, worked for me as well. |
Could someone figure out where does it stop/crash exactly? |
I'm looking in that state of tree: ...
echo "initialising Nix database..." >&2
if ! $nix/bin/nix-store --init; then
echo "$0: failed to initialize the Nix database" >&2
exit 1
fi
if ! $nix/bin/nix-store --load-db < $self/.reginfo; then
echo "$0: unable to register valid paths" >&2
exit 1
fi
. $nix/etc/profile.d/nix.sh
if ! $nix/bin/nix-env -i "$nix"; then
echo "$0: unable to install Nix into your default profile" >&2
exit 1
fi That shows that if [ -n "$HOME" ]; then
NIX_LINK="$HOME/.nix-profile"
# Set the default profile.
if ! [ -L "$NIX_LINK" ]; then
echo "creating $NIX_LINK" >&2
_NIX_DEF_LINK=@localstatedir@/nix/profiles/default
@coreutils@/ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
fi
export PATH=$NIX_LINK/bin:$NIX_LINK/sbin:$PATH
# Subscribe the user to the Nixpkgs channel by default.
if [ ! -e $HOME/.nix-channels ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels
fi
# Append ~/.nix-defexpr/channels/nixpkgs to $NIX_PATH so that
# <nixpkgs> paths work when the user has fetched the Nixpkgs
# channel.
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
# Set $SSL_CERT_FILE so that Nixpkgs applications like curl work.
if [ -e /etc/ssl/certs/ca-bundle.crt ]; then # Fedora, NixOS
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
elif [ -e /etc/ssl/certs/ca-certificates.crt ]; then # Ubuntu, Debian
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
elif [ -e "$NIX_LINK/etc/ca-bundle.crt" ]; then # fall back to Nix profile
export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
fi
fi We can see that it's responsibility to And it does:
Second time this message was not present (NixOS/nixpkgs#7733): So there is indication that this script worked. Then happens: ...
if ! $nix/bin/nix-env -i "$nix"; then
echo "$0: unable to install Nix into your default profile" >&2
exit 1
fi Than means that during invocation,
nix-profile.sh.in was heavilly expanded and rewritten from May of 2015: current nix-profile.sh.in. Last discussion here was Feb 11, 2016 when wawe witnesses bug. Then, on Apr 11, 2016 in (commit)[https://github.com/NixOS/nix/commit/af4fb6ef6169b292c7f54e4278c896cb453c56c5] wmertens heavilly rewrote script. In related to that commit bug #414 named "nix-env doesn't auto-create per-user profile?" he created in 2014 and closed the same Apr 11, 2016 he did commit, in description he states:
By 'https://github.com/NixOS/nix/blob/master/scripts/nix-profile.sh.in#L5-L9' he points to that time master: Lines 5 to 9 in d53735c
Since;
In install script, directory creation uses: if ! [ -e $dest ]; then
cmd="mkdir -m 0755 $dest && chown $USER $dest"
echo "directory $dest does not exist; creating it by running ‘$cmd’ using sudo" >&2
if ! sudo sh -c "$cmd"; then
echo "$0: please manually run ‘$cmd’ as root to create $dest" >&2
exit 1
fi
fi Note that he had message:
So I think case closed here. It is duplicate of bug #414 and already solved crime case. |
Closing as it seems to be resolved. |
I'm having difficulty installing, and there are no error diagnostics to provide further information.
The text was updated successfully, but these errors were encountered: