首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >相互冲突的Nix家庭管理器包

相互冲突的Nix家庭管理器包
EN

Unix & Linux用户
提问于 2022-10-24 12:33:05
回答 1查看 319关注 0票数 0

我一直在使用Nix来管理Mac上的软件包,并遇到了一个新的问题:将ripgrep添加到home.packages中--这以前是很好的。我真的不知道这个错误意味着什么,也不知道如何正确地修复它-谢谢!

代码语言:javascript
复制
$ home-manager switch
/nix/store/g9wiv0f7nhwqjqdn1cwi317zw9anknfs-home-manager-generation
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLaunchAgents
Activating checkLinkTargets
Activating writeBoundary
Activating copyFonts
Activating installPackages
error: files '/nix/store/qdylbr09f0zjc44zkxjrf4ilzkpj05gl-home-manager-path/bin/man' and '/nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path/bin/man' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' or type 'nix profile install --help' if using 'nix profile' to find out howto change the priority of one of the conflicting packages (0 being the highest priority)

Oops, Nix failed to install your new Home Manager profile!

Perhaps there is a conflict with a package that was installed using
"nix profile install"? Try running

    nix profile list

and if there is a conflicting package you can remove it with

    nix profile remove {number | store path}

Then try activating your Home Manager configuration again.

代码语言:javascript
复制
$ nix profile list
0 - - /nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path
1 github:nix-community/comma#packages.aarch64-darwin.default github:nix-community/comma/691120d169189f3a9cb29b1c72bcd521ac372b2b#packages.aarch64-darwin.default /nix/store/la30szfb9m9bq7y8nwc2dmxjlq361rqm-comma-1.2.3
2 - - /nix/store/2jahwbgdzz4cabfp0w1009ysdpb47ycb-home-manager-path

我最近安装了逗号,听起来可能是问题的一部分吗?

EN

回答 1

Unix & Linux用户

发布于 2022-10-31 18:41:10

我还没有一个解决方案,但是在每个home-manager switch之后都需要这样的方法:

代码语言:javascript
复制
nix profile list

# Check numbers, but you need to remove both home-manager profiles:
nix profile remove 0
nix profile remove 0

# Reinstall home manager - I needed a NIX_PATH workaround from https://github.com/nix-community/home-manager/issues/2564#issuecomment-994943471:
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels
nix-shell '' -A install
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/722212

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档