eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 313 forks source link

"Image not found" error when trying to preview site #176

Open charliesneath opened 9 years ago

charliesneath commented 9 years ago

I'm pasting in the error report I'm getting when trying to preview my site locally.

I'm using the recent beta of OS X, and I'm not sure if the below is related.

Any ideas?

Traceback (most recent call last):
File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in <module>
from cactus import cli
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/__init__.py", line 4, in <module>
from cactus.site import Site
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/site.py", line 32, in <module>
from cactus.listener import Listener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/__init__.py", line 7, in <module>
from mac import FSEventsListener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/mac.py", line 33, in <module>
libc = CDLL('libc.dylib')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libc.dylib, 6): image not found
mikejohnstn commented 9 years ago

I'm seeing the same thing (also using El Capitan beta). It also happens when trying to deploy.

krallin commented 9 years ago

Do you have either DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH set in your environment?

mikejohnstn commented 9 years ago

@krallin I don't, no. I tried setting DYLD_FALLBACK_LIBRARY_PATH to /usr/lib in my .bash_profile and restarting Cactus, but that didn't help.

Let me know if you want me to try something else.

krallin commented 9 years ago

@mikejohnstn Do you have a /usr/lib/libc.dylib?

mikejohnstn commented 9 years ago

@krallin I do, yep.

krallin commented 9 years ago

@mikejohnstn

Did you make sure to restart your bash session after updating your bash profile? If not, you might want to just do:

export DYLD_FALLBACK_LIBRARY_PATH=/usr/lib 

cactus serve

And paste your CLI and its output?

mikejohnstn commented 9 years ago

@krallin Ah, I should've mentioned I was using the App Store version. So it's probably a sandboxing/permissions issue.

I just tried it from the command line after an easy_install and it works fine (no need for DYLD_FALLBACK_LIBRARY_PATH).

krallin commented 9 years ago

Ha. Unfortunately I don't actually have access to that code, so this is going to be an issue for @koenbok . He mentioned possibly open-sourcing it, but until then, I can't really help.

I'm sorry : (

mikejohnstn commented 9 years ago

@krallin No prob, thanks for your help. If anyone else encounters this, all you need to do in the meantime is follow the instructions in the repo to install the command line version, and use that: https://github.com/koenbok/Cactus/

aeyoa commented 9 years ago

Faced the same issue on El Capitan as @redmondo. For now will use command line version. Thanks for the help, guys!