python导入cx_Oracle错误
我正在尝试安装 cx_Oracle 以在现有 Oracle 数据库上使用 Django Inspectdb 自动创建 models.py。到目前为止我还很努力。我正在使用 Fedora 14 64 位和 Python 2.7 运行虚拟机,并按照通过 google 找到的混合页面进行安装,并使用 sudo -E easy_install cx_Oracle
当我从终端启动 python 并尝试导入 cx_Oracle 来测试安装时,我得到了this:
>>> import cx_Oracle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libclntsh.so.11.1: cannot enable executable stack as shared object requires: Permission denied
我以前从未见过这个,不知道该怎么办。任何帮助将非常感激。 预先感谢,
斯特凡诺
I'm trying to install cx_Oracle to use Django inspectdb on an existing Oracle database to create models.py automatically. So far i'ts been very hard. I'm running a VM with Fedora 14 64bit and Python 2.7 and followed a mix of pages found with google to get it installed with sudo -E easy_install cx_Oracle
When I fire up python from terminal and try to import cx_Oracle to test the installation I get this:
>>> import cx_Oracle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libclntsh.so.11.1: cannot enable executable stack as shared object requires: Permission denied
I've never seen this before and don't know what to do. Any help would be very much appreciated.
Thanks in advance,
Stefano
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是 SELinux(Fedora 安全系统)阻止了它,但我没有注意到!安装一切正常,现在可以使用了。抱歉并感谢大家。
It was SELinux, Fedora security system that was blocking it and I didn't notice! Installation was ok and it's working now. Sorry and thanks everyone.
我很久以前就遇到过这种情况,
有两组用于 32 位和 64 位的库,只需将这些“*.so”文件复制到适当的目录即可。
请注意,有超过 1 个文件[我猜大约 5 个]需要复制。只需使用 find 命令找到 libclntsh.so 文件的当前位置并将其复制到相应的 lib 目录即可。您可以找到其余文件,因为所有内容都会弹出相同的异常。
It has occurred for me long time back
There are two set of libraries for 32 bit and 64 bit just copy these "*.so" files to the appropriate directories.
Please note there are more than 1 file[around 5 i guess] to be copied . just use a find command to locate your present location of libclntsh.so file and copy it to the respective lib directories. you can find the rest of the files since same exception pops up for everything.
您忘记在 ldconfig 中添加 instantclient 路径;添加它可以解决这个问题。
You forgot to add the instantclient path in ldconfig; adding it will fix this problem.