考虑这个简单的 debian 软件包:wolframscript.deb(要检查,您必须单击 Linux 的下载链接)。解压后文件结构如下:
├── opt
│ └── Wolfram
│ └── WolframScript
│ └── bin
│ └── wolframscript
└── usr
├── local
│ └── share
│ └── man
│ └── man1
│ └── wolframscript.1
└── share
├── icons
│ └── hicolor
│ ├── 128x128
│ │ └── mimetypes
│ │ └── application-vnd.wolfram.wls.png
│ ├── 32x32
│ │ └── mimetypes
│ │ └── application-vnd.wolfram.wls.png
│ └── 64x64
│ └── mimetypes
│ └── application-vnd.wolfram.wls.png
└── mime
└── packages
└── application-vnd.wolfram.wls.xml
唯一相关的文件是opt/Wolfram/WolframScript/bin/wolframscript
二进制文件(我认为)。我尝试简单地执行此操作,但出现bash: ./wolframscript: No such file or directory
错误。如何使这个二进制/包在 NixOS 中可用?
编辑:回答@muru 的问题:
$ file opt/Wolfram/WolframScript/bin/wolframscript
opt/Wolfram/WolframScript/bin/wolframscript: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib
$ ldd opt/Wolfram/WolframScript/bin/wolframscript
linux-vdso.so.1 (0x00007fff767c9000)
libpthread.so.0 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libpthread.so.0 (0x00007f55b8525000)
librt.so.1 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/librt.so.1 (0x00007f55b831d000)
libdl.so.2 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libdl.so.2 (0x00007f55b8119000)
libstdc++.so.6 => not found
libm.so.6 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libm.so.6 (0x00007f55b7d84000)
libgcc_s.so.1 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libgcc_s.so.1 (0x00007f55b7b6e000)
libc.so.6 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6 (0x00007f55b77ba000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f55b874400