Home Download Buy Blog Forum Support

Startup problems (error loading packages) on fresh install

Startup problems (error loading packages) on fresh install

Postby jmansour on Wed Jan 09, 2013 2:03 pm


I'm getting some wierd errors when starting Sublime Text (latest Version 2.0.1, 64 bit Linux). In the console:
'import site' failed; use -v for traceback

and then a popup:
Error loading syntax file "Packages/Text/Plain text.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/Text/Plain text.tmLanguage"

and the Window is all glitchy with no menubar and invisible tabs.

I have to say that I'm trying to run ST in an unusual configuration. I have CentOS 5.8 at work, under which it usually doesn't start. So I've compiled the glibc (2.16.0) and the whole gtk+ stack (gtk+2.24.13), and start it via ld-linux (so it picks up the correct glibc):
Code: Select all
LANG=C LD_LIBRARY_PATH=$HOME/software/glibc-2.16.0/lib:$HOME/software/glibc-2.16.0/lib64:/lib64:/lib:/usr/lib  $HOME/software/glibc-2.16.0/lib/ld-linux-x86-64.so.2  ./sublime_text

This looks a bit wierd, but it works, and I can get various programs to run. However, I'm assuming there is a problem with the builtin python - my system is lacking some library that it needs to process the plugins. Do you have any idea what could be missing, or what I could try next?

It would be really cool if I could get this to work. There is quite some demand for running ST on older Linuxes (see the UserEcho site), as many of us are stuck with them at work.

By the way, the following people also get the second error message (on Windows XP):

Posts: 3
Joined: Wed Jan 09, 2013 1:47 pm

Re: Startup problems (error loading packages) on fresh install

Postby jmansour on Wed Jan 09, 2013 3:01 pm

Nevermind, figured it out. The way I was starting ST was confusing it. I think it mistook the dynamic linker ld-linux.so for itself, and then looked for it's files in $HOME/software/glibc-2.16.0/lib (found that using strace). The dirty solution was to link all of STs files into that directory:
Code: Select all
for file in *; do ln -s "$PWD/$file" $HOME/jmansour/software/glibc-2.16.0/lib -f; done

Now it seems to run fine. No glitches and nothing. I'll test it a bit more, and if it doesn't break anything, I'll probably release the binaries if someone else wants to use them.

There are just a couple of obstacles left:
1) I'd like it to work without the link trick. I guess I'll have to write some small wrapper that starts sublime_text
2) I'm not sure my libraries would work on other computers with different paths, have to try that out.
3) Trim it down to only the neccessary libs, and package it nicely :-)
Screenshot-Hooray! • - Sublime Text 2 (UNREGISTERED).png
Screenshot-Hooray! • - Sublime Text 2 (UNREGISTERED).png (25.58 KiB) Viewed 3925 times
Posts: 3
Joined: Wed Jan 09, 2013 1:47 pm

Re: Startup problems (error loading packages) on fresh install

Postby area on Thu Jun 20, 2013 10:42 am

I managed to get as far as this myself, then found this, only to find that you'd not found a workaround for the 'dirty' symlinking. Did you (or anyone else?) manage to create a suitable wrapper script?

While the editor surely works in this way, there are still a couple of problems I've encountered. If you

Code: Select all
import os

in the terminal, and then try and run something like
Code: Select all

Then you get '11' returned - i.e. a segfault. This is stopping some of my usual plugins from working correctly, as they're unable to interact with anything outside of Sublime - curl, wget, or running external scripts don't work. However,
Code: Select all

returns correctly, as expected. I'm guessing it's something to do with the C system call, which os.system uses, in the GLIBC version I've compiled just for Sublime, but I'm damned if I can figure out where to go from here. If you, or anyone else stumbles across this, I'd be eager to hear your thoughts!

EDIT: You can avoid the dirty linking by using PatchELF (http://nixos.org/patchelf.html) to edit the linker that sublime_text uses. sublime_text then is able to find itself and not the linker, and everything works fine (save for the issues I'm reporting above, which are unfortunately still extant.
Posts: 1
Joined: Thu Jun 20, 2013 10:33 am

Re: Startup problems (error loading packages) on fresh install

Postby yitzhakbg on Fri Jul 12, 2013 9:30 am

I think I have the same problem. It shows loading some of the plugins (only some, not others) but they don't appear.
>>> import os
>>> os.system('ls')
>>> os.listdir('./')
['Icon', 'Packages', 'crash_reporter', 'changelog.txt', 'sublime_plugin.py', 'sublime_text', 'python3.3.zip', 'sublime.py', 'plugin_host']
>>> os.system('ls .')
>>> os.system('pwd')

I suspect it might have something to do with multi-arch, but I'm no great expert at using the linker.

Kindly assist...
Posts: 2
Joined: Tue Mar 05, 2013 3:46 pm

Re: Startup problems (error loading packages) on fresh install

Postby mpr90 on Thu Jan 29, 2015 3:31 am

@jmansour, I know this is an old thread, but I am running into exactly the same problem trying to run ST3 on CentOS 5. Did you ever get this working, and if so, have you a simple set of instructions on how you did it please?

Posts: 2
Joined: Fri Jan 16, 2015 1:39 am

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 24 guests