DeterminateSystems / zero-to-nix

Zero to Nix is your guide to learning Nix and flakes. Created by Determinate Systems.
https://zero-to-nix.com
Other
897 stars 65 forks source link

issue running the dev environment on opensuse 15.5 #378

Open junelac opened 2 days ago

junelac commented 2 days ago

Hello,

I started to follow the guide https://zero-to-nix.com/ in my opensuse 15.5, and got stuck at the point of trying the development environment wth this error

nix develop "https://flakehub.com/f/DeterminateSystems/zero-to-nix/*#example"                                                                                                                                                                           ─╯

mktemp: /lib64/libattr.so.1: version `ATTR_1.3' not found (required by mktemp)
mktemp: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by mktemp)
mktemp: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by mktemp)
mktemp: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by mktemp)
mktemp: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by mktemp)
rm: /lib64/libattr.so.1: version `ATTR_1.3' not found (required by rm)
rm: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by rm)
rm: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by rm)
rm: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by rm)
rm: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by rm)

As a note, the first time I tried I got stuck at the 'Run a program with nix', it was stuck in the download/installation phase, but uninstalling and reinstalling nix made it works.

Also I got this warning during the install:

WARN SelfTest([ShellFailed { shell: Zsh, command: "\"zsh\" \"-ic\" \"nix build --option substitute false --no-link --expr \'derivation { name = \\"self-test-zsh-1730213883388\\"; system = \\"x86_64-linux\\"; builder = \\"/bin/sh\\"; args = [\\"-c\\" \\"echo hello > \\$out\\"]; }\'\"", output: Output { status: ExitStatus(unix_wait_status(32512)), stdout: "", stderr: "nix: searching ... \r nix: command not found \n" } }])

A last comment: uninstalling worked perfectly and I really like the explain option that shows what change are going to be done thanks !

junelac commented 2 days ago

to give more information, the command which works being from my host /usr/bin

$ which rm
/nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm

If I do a ldd in the environment (I just keep the lines related to libattr to keep it simple):

$ ldd /nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm
/nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm: /lib64/libattr.so.1: version `ATTR_1.3' not found (required by /nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm)
    libattr.so.1 => /lib64/libattr.so.1 (0x00007ffff7800000)
    /nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fc8000)

However once I'm back to my regular shell:

ldd /nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm                                                                                                                                                                                    ─╯
    libattr.so.1 => /nix/store/dwkhspb2qz0pbkkxlr6ajgqi388phhwa-attr-2.5.2/lib/libattr.so.1 (0x00007fa38854d000)
    libc.so.6 => /nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib/libc.so.6 (0x00007fa3882bd000)
    /nix/store/c10zhkbp6jmyh0xc5kd123ga8yy2p4hk-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fa388562000)

and indeed from here, rm works:

/nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm --help                                                                                                                                                                                 ─╯
Usage: /nix/store/mr63za5vkxj0yip6wj3j9lya2frdm3zc-coreutils-9.5/bin/rm [OPTION]... [FILE]...