Sublime Forum

Package control error [Errno 2] No such file or directory: './tmpnn1p3h/<any sublime package>.sublime-package'

#1

Whenever I try to install any package using package control, I get the following error. Please note that the tmp dir name is arbitrary and changes every time I try to install it. I am on RH6 machine and using ST3 3114 build.
An error, for example, for SyncedSideBar package:

An error occurred creating the package file SyncedSideBar.sublime-package in ./tmpnn1p3h.

[Errno 2] No such file or directory: ‘./tmpnn1p3h/SyncedSideBar.sublime-package’

Any idea?

Thanks,
Debasis

0 Likes

#2

My guess is that an environmental variable is not set, or something like SELinux is blocking a filesystem operation. Just a guess though.

Package Control uses the Python tempfile module to get a directory to use for constructing a proper .sublime-package file out of a GitHub zip download. For some reason that module seems to be returning a location that isn’t usable on your machine.

0 Likes

#3

Thanks, even I think that’s the reason. I actually found that the package control downloads the folder at my sublime_text_3 installation folder instead of .config/sublime-text-3/Installed Packages folder. Now when the package control tries to install the package, it is looking into .config/sublime-text-3/ folder and cannot find it!

Is there a way around? Can I force the downloading location of the pluging somehow?

0 Likes

#4

The issue got fixed sometime back and thought of mentioning the fix, if someone else falls into the same trap.

Basically, I was setting the TMPDIR and TMP environment variables for other operations and sublime text was not comfortable withe that path. Here is a WA:

Run sublime text along with your intended temporary dir TMPDIR=your_.config_dir_path/sublime-text-3/Packages

in case you have other TMPDIR setup needed for other operations.

0 Likes