Don't know how to solve installation conflict

Hi,

I am on a debian jessie system and have installed nix via https://nixos.org/nix/install which used: https://nixos.org/releases/nix/nix-2.3/nix-2.3-$system.tar.xz .

After the following command the error appears:

$ nix-env -i glibc-2.27 attr-2.4.48 acl-2.2.53 zlib-1.2.11 pcre-8.43 util-linux-2.33.2 libselinux-2.9 glib-2.60.7 libelf-0.8.13 linux-headers-4.19.16 glibc-iconv-2.27 bzip2-1.0.6.0.1 gdbm-1.18.1 sqlite-3.28.0 ncurses-6.1-20190112 bash-4.4-p23 expat-2.2.7 openssl-1.1.1c xz-5.2.4 readline-6.3p08 python3-3.7.4 gnum4-1.4.18 bison-3.4.1 gettext-0.19.8.1 gts-0.7.6 coreutils-8.31 db-5.3.28 python-2.7.16 lz4-1.9.1 libgpg-error-1.36 libgcrypt-1.8.5 cracklib-2.9.7 db-4.8.30 linux-pam-1.3.1 icu4c-64.2 spidermonkey-60.4.0 polkit-0.116 libxml2-2.9.9 libICE-1.0.9 libXdmcp-1.1.3 libXau-1.0.9 libxcb-1.13.1 libX11-1.6.8 libSM-1.2.3 dbus-glib-0.110 libIDL-0.8.14 ORBit2-2.14.19 gconf-3.2.6 libtasn1-4.14 openssl-1.0.2s libpng-apng-1.6.37 giflib-5.1.4 libjpeg-turbo-2.0.3 libtiff-4.0.10 libwebp-1.0.3 libevent-2.1.11 pixman-0.38.4 libXext-1.3.4 libglvnd-1.0.0 libXrender-0.9.10 freetype-2.10.1 fontconfig-2.12.6 cairo-1.16.0 libXt-1.1.5 libXpm-3.5.12 libXmu-1.1.3 libXaw-1.0.13 ilmbase-2.3.0 lcms-1.19 lcms2-2.9 libmng-2.0.3 openexr-2.3.0 libdevil-1.7.8 fribidi-1.0.5 libXft-2.3.3 graphite2-1.3.6 harfbuzz-2.6.1 pango-1.43.0 gd-2.2.5 graphviz-2.32.0 libXi-1.7.10 libXtst-1.2.3 alsa-lib-1.1.9 libXinerama-1.1.4 hook libdaemon-0.14 avahi-0.7 p11-kit-0.23.16.1 libunistring-0.9.10 gmp-6.1.2 dns-root-data-2019-01-11 nettle-3.4.1 gnutls-3.6.9 gamin-0.1.10 gnome-vfs-2.24.4 liberation-fonts-2.00.4 libXfixes-5.0.3 jasper-2.0.16 gdk-pixbuf-2.38.1 libXcomposite-0.4.5 atk-2.32.0 libXcursor-1.2.0 libXrandr-1.5.2 file-5.37 plantuml-1.2019.8
warning: there are multiple derivations named ‘glibc-2.27’; using the first one
warning: there are multiple derivations named ‘zlib-1.2.11’; using the first one
warning: there are multiple derivations named ‘ncurses-6.1-20190112’; using the first one
warning: there are multiple derivations named ‘python3-3.7.4’; using the first one
warning: there are multiple derivations named ‘gettext-0.19.8.1’; using the first one
warning: there are multiple derivations named ‘coreutils-8.31’; using the first one
warning: there are multiple derivations named ‘python-2.7.16’; using the first one
warning: there are multiple derivations named ‘libgpg-error-1.36’; using the first one
warning: there are multiple derivations named ‘dbus-glib-0.110’; using the first one
warning: there are multiple derivations named ‘libpng-apng-1.6.37’; using the first one
warning: there are multiple derivations named ‘libdevil-1.7.8’; using the first one
warning: there are multiple derivations named ‘p11-kit-0.23.16.1’; using the first one
warning: there are multiple derivations named ‘liberation-fonts-2.00.4’; using the first one
warning: there are multiple derivations named ‘gdk-pixbuf-2.38.1’; using the first one
replacing old ‘openssl-1.1.1c’
replacing old ‘zlib-1.2.11’
replacing old ‘glibc-2.27’
replacing old ‘graphviz-2.40.1’
replacing old ‘bash-5.0-p9’
replacing old ‘file-5.37’
replacing old ‘plantuml-1.2019.8’
installing ‘glibc-2.27’
installing ‘attr-2.4.48’
installing ‘acl-2.2.53’
installing ‘zlib-1.2.11’
installing ‘pcre-8.43’
installing ‘util-linux-2.33.2’
installing ‘libselinux-2.9’
installing ‘glib-2.60.7’
installing ‘libelf-0.8.13’
installing ‘linux-headers-4.19.16’
installing ‘glibc-iconv-2.27’
installing ‘bzip2-1.0.6.0.1’
installing ‘gdbm-1.18.1’
installing ‘sqlite-3.28.0’
installing ‘ncurses-6.1-20190112’
installing ‘bash-4.4-p23’
installing ‘expat-2.2.7’
installing ‘openssl-1.1.1c’
installing ‘xz-5.2.4’
installing ‘readline-6.3p08’
installing ‘python3-3.7.4’
installing ‘gnum4-1.4.18’
installing ‘bison-3.4.1’
installing ‘gettext-0.19.8.1’
installing ‘gts-0.7.6’
installing ‘coreutils-8.31’
installing ‘db-5.3.28’
installing ‘python-2.7.16’
installing ‘lz4-1.9.1’
installing ‘libgpg-error-1.36’
installing ‘libgcrypt-1.8.5’
installing ‘cracklib-2.9.7’
installing ‘db-4.8.30’
installing ‘linux-pam-1.3.1’
installing ‘icu4c-64.2’
installing ‘spidermonkey-60.4.0’
installing ‘polkit-0.116’
installing ‘libxml2-2.9.9’
installing ‘libICE-1.0.9’
installing ‘libXdmcp-1.1.3’
installing ‘libXau-1.0.9’
installing ‘libxcb-1.13.1’
installing ‘libX11-1.6.8’
installing ‘libSM-1.2.3’
installing ‘dbus-glib-0.110’
installing ‘libIDL-0.8.14’
installing ‘ORBit2-2.14.19’
installing ‘gconf-3.2.6’
installing ‘libtasn1-4.14’
installing ‘openssl-1.0.2s’
installing ‘libpng-apng-1.6.37’
installing ‘giflib-5.1.4’
installing ‘libjpeg-turbo-2.0.3’
installing ‘libtiff-4.0.10’
installing ‘libwebp-1.0.3’
installing ‘libevent-2.1.11’
installing ‘pixman-0.38.4’
installing ‘libXext-1.3.4’
installing ‘libglvnd-1.0.0’
installing ‘libXrender-0.9.10’
installing ‘freetype-2.10.1’
installing ‘fontconfig-2.12.6’
installing ‘cairo-1.16.0’
installing ‘libXt-1.1.5’
installing ‘libXpm-3.5.12’
installing ‘libXmu-1.1.3’
installing ‘libXaw-1.0.13’
installing ‘ilmbase-2.3.0’
installing ‘lcms-1.19’
installing ‘lcms2-2.9’
installing ‘libmng-2.0.3’
installing ‘openexr-2.3.0’
installing ‘libdevil-1.7.8’
installing ‘fribidi-1.0.5’
installing ‘libXft-2.3.3’
installing ‘graphite2-1.3.6’
installing ‘harfbuzz-2.6.1’
installing ‘pango-1.43.0’
installing ‘gd-2.2.5’
installing ‘graphviz-2.32.0’
installing ‘libXi-1.7.10’
installing ‘libXtst-1.2.3’
installing ‘alsa-lib-1.1.9’
installing ‘libXinerama-1.1.4’
installing ‘hook’
installing ‘libdaemon-0.14’
installing ‘avahi-0.7’
installing ‘p11-kit-0.23.16.1’
installing ‘libunistring-0.9.10’
installing ‘gmp-6.1.2’
installing ‘dns-root-data-2019-01-11’
installing ‘nettle-3.4.1’
installing ‘gnutls-3.6.9’
installing ‘gamin-0.1.10’
installing ‘gnome-vfs-2.24.4’
installing ‘liberation-fonts-2.00.4’
installing ‘libXfixes-5.0.3’
installing ‘jasper-2.0.16’
installing ‘gdk-pixbuf-2.38.1’
installing ‘libXcomposite-0.4.5’
installing ‘atk-2.32.0’
installing ‘libXcursor-1.2.0’
installing ‘libXrandr-1.5.2’
installing ‘file-5.37’
installing ‘plantuml-1.2019.8’
building ‘/nix/store/xhl7d3kvxav5plc94idkznda9594wrms-user-environment.drv’…
warning: skipping dangling symlink ‘/nix/store/qx2iradbqpp9bvyhvvignrws1jjq0rmp-user-environment/bin/unix_chkpwd’
warning: skipping dangling symlink ‘/nix/store/qx2iradbqpp9bvyhvvignrws1jjq0rmp-user-environment/sbin/unix_chkpwd’
error: packages ‘/nix/store/jgb218298lf7pk80ryh8xj333mzx1c1y-openssl-1.0.2s-man/share/man/man1/openssl-enc.1ssl.gz’ and ‘/nix/store/04c0bnihaw0s65y6vfy9rvckyp22rwq3-openssl-1.1.1c-man/share/man/man1/openssl-enc.1ssl.gz’ have the same priority 5; use ‘nix-env --set-flag priority NUMBER INSTALLED_PKGNAME’ to change the priority of one of the conflicting packages (0 being the highest priority)
builder for ‘/nix/store/xhl7d3kvxav5plc94idkznda9594wrms-user-environment.drv’ failed with exit code 1
error: build of ‘/nix/store/xhl7d3kvxav5plc94idkznda9594wrms-user-environment.drv’ failed

I tried:

$ nix-env -i openssl-1.0.2s
replacing old ‘openssl-1.1.1c’
installing ‘openssl-1.0.2s’

$ nix-env --set-flag priority 5 openssl-1.0.2s
setting flag on ‘openssl-1.0.2s’
building ‘/nix/store/h33pz4km74grlb6v0a9d6xx69x7i7sn5-user-environment.drv’…
created 2161 symlinks in user environment

$ nix-env -i openssl-1.1.1c
replacing old ‘openssl-1.0.2s’
installing ‘openssl-1.1.1c’

$ nix-env --set-flag priority 4 openssl-1.1.1c
setting flag on ‘openssl-1.1.1c’

But the error keeps.

What can I do?

Besides that I wonder why are not all dependencies got installed. In a nixos system there are other libraries which are installed from the beginning. In the nix installation they are missing and sometimes I install them (e.g. binutils) manually. Is there a package which I can install, which installs all needed system packages?

Thanks in Advance.

You are explicitly trying to install multiple versions of the openssl package. Of course these are going to conflict.

Is there a reason you’re trying to manually install a bunch of libraries? You generally only need to install the end-user packages, and those packages will pull in any dependencies as needed.

Hi,

thanks for the answer, I didn’t really see that.

I only try to get plantuml running and because after a simple installation via nix-env plantuml crashes I tried to install the dependencies which I figured out via

nix-store --query --requisites $(readlink -f $(which plantuml)) | 
 sed 's+/nix/store/.\{32\}-\(.*\)+\1+1 ; s/-\(dev\|bin\|lib\|jre\)$//1 ' | 
 sort | uniq >/tmp/deps.txt

and before I install via 

nix-env -i $(cat /tmp/deps.txt )

I remove doubled entries and some which did not be able to install but I wonder why there are uninstallable entries from the nix-store --query --requisites call:

error: selector 'dejavu-fonts-minimal-2.37' matches no derivations
error: selector 'gtk+-2.24.32' matches no derivations

plantuml seems to need gtk bindings (more precisely the java installation behind that)

but I don't know how to get this package installed.

In the meantime, installing 'gtk+-2.24.32' was solved by nix-env -i 'gtk\+-2.24.32' . 

Plantuml still not working. 

It seems to be a conflict between the underlying debian system and the nix overlay installation.

At any point the nix installation uses the /etc configuration which is not managed by nix.

$ LANG=C plantuml 
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf

(plantuml:9597): Gtk-WARNING **: 11:33:34.748: Unable to locate theme engine in module_path: "oxygen-gtk",
Error parsing gtk-icon-sizes string: ''
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f74f0ad4b0f, pid=9597, tid=0x00007f74ed7ab700
#
# JRE version: OpenJDK Runtime Environment (8.0_222) (build 1.8.0_222-ga)
# Java VM: OpenJDK 64-Bit Server VM (25.222-bga mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0x152b0f]  __memmove_avx_unaligned_erms+0x12f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/ox_nix/hs_err_pid9597.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abgebrochen

Fontconfig is installed under nix but how can I tell nix that it should use maybe another /etc directory? It seems to be that other packages provide -etc directories inside /nix/store, why not fontconfig?

I don’t know about your specific plantuml issue, maybe @bjornfor can speak as to that, but regarding the dependencies, you really don’t need to install them yourself. Everything in your /tmp/deps.txt file is already by definition something that plantuml itself declared as a dependency and therefore already has access to.

@pure_procrastinative: Looks like plantuml breaks on non-NixOS. (I just tested in Ubuntu 18.04 and got a similar SIGSEGV from Java.) Can you create a github issue?