Chỉ cập nhật máy Mac của tôi lên El Capitan 10.11. Tôi cố gắng để chạy Django 1.6 với cần tây 3.1 và tôi nhận được lỗi này ngay bây giờ:OSError: dlopen (libSystem.dylib, 6): không tìm thấy hình ảnh
Unhandled exception in thread started by <function wrapper at 0x10f861050>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name, True)
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/debug_toolbar/models.py", line 9, in <module>
dt_settings.patch_all()
File "/Library/Python/2.7/site-packages/debug_toolbar/settings.py", line 215, in patch_all
patch_root_urlconf()
File "/Library/Python/2.7/site-packages/debug_toolbar/settings.py", line 203, in patch_root_urlconf
reverse('djdt:render_panel')
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 503, in reverse
app_list = resolver.app_dict[ns]
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 329, in app_dict
self._populate()
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 267, in _populate
for pattern in reversed(self.url_patterns):
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/pedrotorres/Documents/work/projects/bparts/netpecasv2/urls.py", line 10, in <module>
url(r'', include('Common.urls')),
File "/Library/Python/2.7/site-packages/django/conf/urls/__init__.py", line 26, in include
urlconf_module = import_module(urlconf_module)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/pedrotorres/Documents/work/projects/bparts/Common/urls.py", line 3, in <module>
from APIMobile.views import request_product_info_by_qrcode
File "/Users/pedrotorres/Documents/work/projects/bparts/APIMobile/views.py", line 9, in <module>
from Common.views import resizeImage, token_generator, getWatermarkImage, filterProductsByBrandModelVersionYear, \
File "/Users/pedrotorres/Documents/work/projects/bparts/Common/views.py", line 34, in <module>
from Common.tasks import turn_off_demo_mode_new_workshop
File "/Users/pedrotorres/Documents/work/projects/bparts/Common/tasks.py", line 3, in <module>
from netpecasv2.celeryapp import app
File "/Users/pedrotorres/Documents/work/projects/bparts/netpecasv2/celeryapp.py", line 5, in <module>
from celery import Celery
File "/Library/Python/2.7/site-packages/celery/__init__.py", line 130, in <module>
from celery import five
File "/Library/Python/2.7/site-packages/celery/five.py", line 51, in <module>
from kombu.five import monotonic
File "/Library/Python/2.7/site-packages/kombu/five.py", line 52, in <module>
libSystem = ctypes.CDLL('libSystem.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(libSystem.dylib, 6): image not found
Tất cả mọi thứ hoạt động tốt trước đó. Không thể tìm thấy giải pháp để sửa lỗi này. Tôi đã xem chủ đề này nhưng không hoạt động: "OSError: dlopen(libSystem.dylib, 6): image not found" (OS X + macports + Celery 3.1.7)
Tôi chưa có bất kỳ DYLD_FALLBACK_LIBRARY_PATH nào trước đây. Tôi cố gắng để:
export DYLD_FALLBACK_LIBRARY_PATH="/usr/lib":$DYLD_FALLBACK_LIBRARY_PATH
nhưng Python không thể tìm thấy thư viện mặc dù nó được nằm dưới "/ usr/lib"
Bất cứ ai đã có vấn đề như thế này?
Vâng, mặc dù giải pháp đó không được đề xuất, tôi đã thử nó và nó hoạt động. Giải pháp tốt nhất cho đến nay. – pedrotorres
@Joe Young: Đây cũng có thể là trường hợp của tôi vì việc nâng cấp lên El Capitan tôi không thể chạy cần tây nữa. Tôi đang sử dụng rộng rãi cần tây để phát triển địa phương và tôi thực sự cần nó, nhưng như bạn đã đề cập, đó là một biện pháp cực đoan để vô hiệu hóa SIP hoàn toàn. Có giải pháp nào khác mà bạn có thể muốn đề xuất không? – SpiXel
Chỉ cần nâng cấp lên El Capitan. Làm việc cho tôi là tốt. Đối với những người chưa biết, bạn có thể mở chế độ khôi phục cho máy Mac của mình bằng cách giữ CMD + R trong khi khởi động. Cảm ơn Joe! –