-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: could not dynamically open plugin file … libnix_doc_plugin.so #237637
Comments
greetings @tdillenburg Is my understanding correct
if that's the case, and we are confident that removing
If that fixes nix, the after next nixos-rebuild /etc/nix/nix.conf will be restored to correct symlink Hopefully this helps |
I have a hunch as to why this is happening: most likely you're using a newer version of Nix to build your configuration (the default behaviour of nixos-rebuild is to reexec Nix of the version from the new config but probably not with the new nix.conf from the config (bug??)) and so that newer version of Nix is being used with the old nix.conf to build the new NixOS config. It's plausible that you can avoid this by either using --fast with nixos-rebuild to disable such reexec or pass I believe that this problem is sadly unavoidable without somehow detecting linker errors and bailing on the dynamic library loading, which, maybe that's possible but I doubt it. |
Thank you @kirillrdy. It worked perfectly. I didn't know nix kept a static version of files and that I could simply replace it. Without the plugin-files line nixos-rebuild worked. @lf-, it's weird because I had nix-doc for a long time in my config but it just "broke" now. Well, I'm not sure why it broke, but the workarround worked. Thanks! |
Nix has not had many updates in nixpkgs as of late. That is my best guess as to cause. Either way, I'm glad you got it fixed. nix-doc should work with the latest Nix once you have your config rebuilt successfully. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-07-24-nix-team-meeting-minutes-75/31112/2 |
Fixes NixOS#237637 and its entire class of problems by making nix-doc save the version it was built for in the library and then bail harmlessly if it is mismatched. ``` dev/nixpkgs2 » nix-build -A nix-doc /nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10 dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2 /nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1 dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl nix-doc warning: mismatched nix version, not loading Welcome to Nix 2.14.1. Type :? for help. nix-repl> ```
Fixes NixOS#237637 and its entire class of problems by making nix-doc save the version it was built for in the library and then bail harmlessly if it is mismatched. ``` dev/nixpkgs2 » nix-build -A nix-doc /nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10 dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2 /nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1 dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl nix-doc warning: mismatched nix version, not loading Welcome to Nix 2.14.1. Type :? for help. nix-repl> ```
Fixes #237637 and its entire class of problems by making nix-doc save the version it was built for in the library and then bail harmlessly if it is mismatched. ``` dev/nixpkgs2 » nix-build -A nix-doc /nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10 dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2 /nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1 dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl nix-doc warning: mismatched nix version, not loading Welcome to Nix 2.14.1. Type :? for help. nix-repl> ```
Fixes NixOS#237637 and its entire class of problems by making nix-doc save the version it was built for in the library and then bail harmlessly if it is mismatched. ``` dev/nixpkgs2 » nix-build -A nix-doc /nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10 dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2 /nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1 dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl nix-doc warning: mismatched nix version, not loading Welcome to Nix 2.14.1. Type :? for help. nix-repl> ```
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/libnix-doc-plugin-so-is-putting-me-in-an-upgrade-deadlock/32647/4 |
When trying to switch to a new generation,
nixos-rebuild switch --flake '.#'
throws this error:Apparently it's an issue with nix-doc. In nix-doc issue 20, the author suggests overriding nix but it didn't work. It seams like nix got corrupted.
This is pointed as a risk at nix documentation:
I've tryed removing
nix-doc
andnix.extraOptions = "plugin-files = ${pkgs.nix-doc}/lib/libnix_doc_plugin.so";
but the error perssists and nixos can't switch to the new generations.I can't edit
/etc/nix/nix.conf
as it's linked so I can't manually remove the line:plugin-files = /nix/store/458wmvsdw95kd96j88gnhjc6a38hq8aw-nix-doc-0.5.8/lib/libnix_doc_plugin.so
Steps To Reproduce
Steps to reproduce the behavior:
nixos-rebuild switch
ornixos-rebuild boot
Expected behavior
There should be a way to unlink dynamic libraries linked to nix cli during build time.
Notify maintainers
@lf-
Metadata
I can't run
nix-shell -p nix-info --run "nix-info -m"
.nixos-version:
23.11.20230606.4729ffa (Tapir)
nix --version
was 2.13.1, but it throws error nowThe text was updated successfully, but these errors were encountered: