Sublime Forum

Installing Sublime Merge on NixOS

#1

Hi

I’m trying to use Sublime Merge on NixOS. Since it’s not yet in the package manager (there is an issue on that here in the forum) I’ve downloaded sublime merge (the 64 bit.tar.xz). I get a very strange error when I try to execute it though.

./sublime_merge 
Failed to execute process './sublime_merge'. Reason:
The file './sublime_merge' does not exist or could not be executed.

Does anyone know how to fix this?

0 Likes

#2

What did you do with the tarball after you downloaded it?

Or if you will, ./sublime_merge will only work if you first extracted the tarball somewhere, then changed the current directory to the directory that the extraction created first.

0 Likes

#3

I downloaded, extracted, cd’d into the folder and then did the ./sublime_merge bit. :slight_smile:

> ls
< changelog.txt           Icon                 sublime_merge
< crash_reporter          Packages             sublime_merge.desktop
< git-credential-sublime  ssh-askpass-sublime

> ./sublime_merge 
< Failed to execute process './sublime_merge'. Reason:
< The file './sublime_merge' does not exist or could not be executed.
0 Likes

#4

Problem persists with “Build 1070”.

0 Likes

#5

Is your NixOS isntall 32bit or 64bit?

0 Likes

#6

I believe it’s 64 bit. At least that’s what lscpu seems to tell me. Is there another way of checking this?

> lscpu
< Architektur:                   x86_64
< CPU Operationsmodus:           32-bit, 64-bit
< Byte-Reihenfolge:              Little Endian
< CPU(s):                        8
< Liste der Online-CPU(s):       0-7
< Thread(s) pro Kern:            2
< Kern(e) pro Socket:            4
< Sockel:                        1
< NUMA-Knoten:                   1
< Anbieterkennung:               GenuineIntel
< Prozessorfamilie:              6
< Modell:                        94
< Modellname:                    Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz
< Stepping:                      3
< CPU MHz:                       901.168
< Maximale Taktfrequenz der CPU: 3500.0000
< Minimale Taktfrequenz der CPU: 800.0000
< BogoMIPS:                      5184.00
< Virtualisierung:               VT-x
< L1d Cache:                     32K
< L1i Cache:                     32K
< L2 Cache:                      256K
< L3 Cache:                      6144K
< NUMA-Knoten0 CPU(s):           0-7
0 Likes

#7

You could try uname -a to see if it also mentions x86_64 or not, but I think it probably gets the information from the same place as lscpu does.

As a shot in the dark/straw grasp, does ldd sublime_merge mention any libraries that might be missing? I would expect not because that’s usually a different error, but it may shed some light on things.

Similarly you could check and see that the binary has executable permissions, but it should come out of the tarball that way and I’d expect something like a “Permission Denied” error in that case.

1 Like

#8

Uname:

> uname -a
< Linux nuc-nixos 4.14.73 #1-NixOS SMP Sat Sep 29 10:06:07 UTC 2018 x86_64 GNU/Linux

ldd:

> ldd sublime_merge
< linux-vdso.so.1 (0x00007ffce41d6000)
< libgobject-2.0.so.0 => not found
< libglib-2.0.so.0 => not found
< libX11.so.6 => not found
< librt.so.1 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/librt.so.1 (0x00007f9f9d670000)
< libdl.so.2 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libdl.so.2 (0x00007f9f9d46c000)
< libm.so.6 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libm.so.6 (0x00007f9f9d0d7000)
< libpthread.so.0 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libpthread.so.0 (0x00007f9f9ceb8000)
< libc.so.6 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6 (0x00007f9f9cb04000)
< /lib64/ld-linux-x86-64.so.2 => /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f9f9d878000)

Looks like here is the error

0 Likes

#9

Looks like NixOS does no longer support gtk-2.0 which is used by Sublime Text and Sublime Merge for common dialogs and stuff.

0 Likes

#10

What does this mean?
Nixos doesn’t support gtk-2 or doesn’t have it preinstalled? Does sublime merge come with the library or do I need to provide them?

(I can’t find anything about this on the download page)

0 Likes

#11

You’ll probably need to write some nix install recipe that tells the package manager to provide gtk2 for it. I don’t know exactly how nix works, but presumably it isolates packages and bundles dependencies with their own required version for isolation.

0 Likes

#12

okay. thank you all

0 Likes