2

I upgraded to El Capitan (version 10.11 Beta 7, build 15A263e) a few days ago. Aside from issues related to permissions, everything seemed to work fine. However, when I try to run some Haxe libraries, or use the Python package manager pip, I get errors related to zlib, which I'm not sure how to resolve.

The Haxe error occurs when I try to run haxelib run lime setup, and I get this:

Called from /usr/lib/haxe/std/neko/_std/haxe/zip/Compress.hx line 60
Uncaught exception - load.c(237) : Failed to load library : zlib.ndll (dlopen(zlib.ndll, 1): image not found)

When I try to run pip, which I installed via Homebrew, I get this:

Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.2', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Library/Python/2.7/site-packages/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar  # noqa
File "/Library/Python/2.7/site-packages/pip/vcs/mercurial.py", line 10, in <module>
from pip.download import path_to_url
File "/Library/Python/2.7/site-packages/pip/download.py", line 38, in <module>
from pip._vendor import requests, six
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/__init__.py", line 58, in <module>
from . import utils
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/utils.py", line 26, in <module>
from .compat import parse_http_list as _parse_list_header
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/compat.py", line 7, in <module>
from .packages import chardet
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 10, in <module>
from .connectionpool import (
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 38, in <module>
from .response import HTTPResponse
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 5, in <module>
import zlib
ImportError: No module named zlib

This is in addition to permissions errors with pip; I can't run pip without using sudo, but I think that's probably unrelated.

Any thoughts? I think that building the missing the zlib.ndll might fix the issue, but I don't know what the "right" way to do that is.

1
  • I was able to fix the pip issues with this, but Haxe is still funky. Aug 27, 2015 at 14:55

1 Answer 1

2

Haxe requires neko to be configured correctly to run tools like haxelib. You can install neko via Homebrew with the following steps. First you need zlib and sqlite because neko requires both.

brew install zlib sqlite3

You will now need to force Homebrew to link these since they are keg-only libraries and neko needs the include files in /usr/local/include.

brew link zlib --force
brew link sqlite3 --force

Finally, install neko through Homebrew. Make sure you also set NEKOPATH to the homebrew directory created.

brew install neko --HEAD
3
  • This explains how to install neko via Homebrew but how does this relate to the question posted? Also, Homebrew is not “a few steps” if one does not have Xcode installed which can be a 4GB+ download and setup. Oct 2, 2015 at 5:32
  • The error Steve is getting is related to neko not being configured properly for Haxe. I updated my answer. Oct 2, 2015 at 15:07
  • +1 Thanks for adding the context. My opinion on Homebrew being presented as it has is still the same, but I still think this is a good answer. Oct 2, 2015 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .