%20%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8%20%EC%B1%84%EB%84%90%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94%20%EA%B2%BD%EC%9A%B0%20%EC%9E%91%EC%97%85%EC%9D%B4%20%ED%97%88%EC%9A%A9%EB%90%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
저는 아치 리눅스를 사용합니다 4.19.15-1-lts #1 SMP Sun Jan 13 13:53:52 CET 2019 x86_64 GNU/Linux
. Nix도 설치되어 있습니다: nix-env (Nix) 2.2
.
최근 버전 업데이트 전까지는 아무런 문제가 없었습니다 2.2
. 저는 항상 다음 두 단계를 통해 업그레이드/업데이트를 수행합니다.
$ nix-channel --update
...
$ nix-env --upgrade
...
...하지만 최근 2.2
업데이트 이후에는 더 이상 작업을 수행할 수 있는 방법을 찾을 수 없습니다 nix-channel --update
. 항상 다음과 같은 오류가 발생합니다.
error: cloning builder process: Operation not permitted
error: unable to start build process
error: program '/nix/store/876x7a35qbn3q062b6zcz6va88m0990d-nix-2.2/bin/nix-env' failed with exit code 1
...이전 작업을 롤백하더라도 다음과 같습니다.
$ nix-channel --update
unpacking channels...
error: cloning builder process: Operation not permitted
error: unable to start build process
error: program '/nix/store/876x7a35qbn3q062b6zcz6va88m0990d-nix-2.2/bin/nix-env' failed with exit code 1
$ nix-channel --rollback
switching from generation 40 to 39
$ nix-channel --update
unpacking channels...
error: cloning builder process: Operation not permitted
error: unable to start build process
error: program '/nix/store/876x7a35qbn3q062b6zcz6va88m0990d-nix-2.2/bin/nix-env' failed with exit code 1
이것이 업데이트 목록에 있는 내용입니다.
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable
...결국에는 삭제할 수도 없습니다.
$ nix-channel --remove nixpkgs
uninstalling 'nixpkgs-19.03pre165281.7d864c6bd63'
error: cloning builder process: Operation not permitted
error: unable to start build process
error: program '/nix/store/876x7a35qbn3q062b6zcz6va88m0990d-nix-2.2/bin/nix-env' failed with exit code 1
재설치를 피하고 싶습니다.
업데이트
나는 기다릴 수 없었다! 영형:)
계속해서 현재 설치를 제거하고...새로 설치하면 기본적으로 동일한 결과를 얻었습니다.
$ sh <(curl https://nixos.org/nix/install) --no-daemon
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2476 100 2476 0 0 5417 0 --:--:-- --:--:-- --:--:-- 5406
downloading Nix 2.2.1 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.2.1/nix-2.2.1-x86_64-linux.tar.bz2' to '/tmp/nix-binary-tarball-unpack.n5vqvsi4Uq'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22.5M 100 22.5M 0 0 4016k 0 0:00:05 0:00:05 --:--:-- 4377k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown x80486 /nix' using sudo
[sudo] password for x80486:
copying Nix to /nix/store.................................
initialising Nix database...
Nix: creating /home/x80486/.nix-profile
installing 'nix-2.2.1'
error: cloning builder process: Operation not permitted
error: unable to start build process
/tmp/nix-binary-tarball-unpack.n5vqvsi4Uq/unpack/nix-2.2.1-x86_64-linux/install: unable to install Nix into your default profile
...일반적으로 Linux(또는 특히 사용하는 배포판)와 Nix에 문제가 있는 것 같습니다.
답변1
의 제안에 따라이 댓글문제를 해결합니다.
sysctl kernel.unprivileged_userns_clone=1
답변2
Nix는 클론에 꽤 많은 플래그를 사용합니다., 주로 일부 Linux 네임스페이스를 분리합니다. 귀하의 시스템이 이들 중 일부를 지원하지 않을 것으로 예상됩니다.특권이 없는프로세스. IIRC 일부 배포판은 보안 문제 때문에 이를 선택했습니다.