为什么nixos-rebuild开关会为未使用的东西创建商店?

时间:2019-01-03 17:38:07

标签: nixos

在将频道从nixos-18.09切换到nixos-unstable并返回时,我对系统做了一些操作,现在遇到了一个问题,导致$ nixos-rebuild switch无法成功运行。

当我尝试这样做时,出现以下错误:

writing manifest file 'singledispatch.egg-info/SOURCES.txt'
Copying singledispatch.egg-info to build/bdist.linux-x86_64/wheel/singledispatch-3.4.0.3-py3.6.egg-info
running install_scripts
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 20, in <module>
    long_description = f.read()
  File "/nix/store/qbyckcddc74s2fi060n8xqcn8gygrhjl-python3-3.6.8/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 898: ordinal not in range(128)
builder for '/nix/store/mcncvdwadrq1335bwy279dg7q0sxhvhp-python3.6-rsa-4.0.drv' failed with exit code 1
cannot build derivation '/nix/store/pifmbmqallj7jkl3ar1wv8nqyfzq08hr-python3.6-python-jose-3.0.1.drv': 1 dependencies couldn't be built
building '/nix/store/1qy7ka8c0s3mjv51pdiyyp103d11awkb-python3.6-termstyle-0.1.11.drv'...
building '/nix/store/8zvlx7367p21vj0iccsvhpz1jv3wx0b6-python3.6-websocket_client-0.54.0.drv'...
cannot build derivation '/nix/store/3w08jzilgvddzx728nnkpaadc7sd9p2v-python3.6-moto-1.3.7.drv': 1 dependencies couldn't be built
building '/nix/store/qfkfr913dx4ssp1qahfd9wcj6csf6yxm-python3.6-xlrd-1.1.0.drv'...
building '/nix/store/dvi6y2zlc4gwli0qqhxhr6cbvfs5qwhx-python3.6-xlwt-1.3.0.drv'...
building '/nix/store/p38p279r5y8bh7n9pvw8194k9zvnybic-reload-container.drv'...
cannot build derivation '/nix/store/sf4d3zrds99sq22s096f4pdwb2602mf2-python3.6-pandas-0.23.4.drv': 1 dependencies couldn't be built
building '/nix/store/hy1197qj5ivb54wicyn0ljdbv8qxp0zc-remove-references-to.drv'...
building '/nix/store/6cqp8vf151gvxbnz03qp4sj9awd8lnfc-smb-dummy.conf.drv'...
building '/nix/store/cb5r8y9llx4yw64kyg2hhwds4g123h29-stage-1-init.sh.drv'...
building '/nix/store/4ps1704mhdqj5bp1ck7sa2x67l7h08x4-su.pam.drv'...
cannot build derivation '/nix/store/hx05mqxryfl1aqvc5lqf0q05n230qnz3-system-path.drv': 1 dependencies couldn't be built
building '/nix/store/zrrbcfif92d7yz1d4vlcnva3gx8npc2k-systemd-boot-builder.py.drv'...
building '/nix/store/z8mld3scs2hzb6k3hffjqvfyrg9qnlg7-systemd-user.pam.drv'...
building '/nix/store/0gixkqfsr3plwcyf72izycpkr5rf1r6k-udev-rules.drv'...
cannot build derivation '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv': 1 dependencies couldn't be built
error: build of '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv' failed

我尝试通过运行删除有问题的路径

$ nix-store --delete /nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv

根据该路径,该路径没有“引荐来源网址”

$ nix-store -q --referrers /nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv`)

我还使用$ nix-store --gc进行了垃圾收集。但是,运行$ nixos-rebuild switch仍会重新创建此路径,并再次给出相同的错误。

为什么$ nixos-rebuild switch创建此路径,如何使该命令再次成功运行?

我不确定为什么nixos-system-nixos-19.03会出现在我的系统上;目前,我仅跟踪nixos-18.09频道:

$ nixos-channel --list
nixos-18.09 https://nixos.org/channels/nixos-18.09

1 个答案:

答案 0 :(得分:1)

如果您过滤掉错误消息,那么事件链非常清楚:

>>> point43 = Decimal("0.43") 
>>> num = Decimal('1.43') 
>>> (abs(num) - point43) % 1 == 0 
True

因此,Python builder for '/nix/store/mcncvdwadrq1335bwy279dg7q0sxhvhp-python3.6-rsa-4.0.drv' failed with exit code 1 cannot build derivation '/nix/store/pifmbmqallj7jkl3ar1wv8nqyfzq08hr-python3.6-python-jose-3.0.1.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/3w08jzilgvddzx728nnkpaadc7sd9p2v-python3.6-moto-1.3.7.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/sf4d3zrds99sq22s096f4pdwb2602mf2-python3.6-pandas-0.23.4.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/hx05mqxryfl1aqvc5lqf0q05n230qnz3-system-path.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv': 1 dependencies couldn't be built error: build of '/nix/store/19sp5z5i8kg7x0inyrb1kzm1n6g6rzcc-nixos-system-nixos-19.03pre164715.201d739b0ff.drv' failed 模块的构建失败,因为该软件包存在错误。

我们为什么要依靠rsa?因为...


顺便说一句,虽然在nixpkgs-unstable上是这种情况,但18.09版(此答案的最新发布)在rsa上没有python-jose的依赖性,因此没有展示手头的问题。我建议改用它吗?