cqlsh under cygwin fails without an error message

杀马特。学长 韩版系。学妹 提交于 2020-01-04 14:06:50

问题


I'm trying to run cassandra's cqlsh under cygwin, and it exits without displaying an error:

/c/apps/apache-cassandra-2.0.9
>./bin/cqlsh

>

It looks like a python script:

#!/bin/sh
# -*- mode: Python -*-

...

# bash code here; finds a suitable python interpreter and execs this file.
# prefer unqualified "python" if suitable:
python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 0x03000000))' 2>/dev/null \
    && exec python "$0" "$@"
for pyver in 2.6 2.7 2.5; do
    which python$pyver > /dev/null 2>&1 && exec python$pyver "$0" "$@"
done
echo "No appropriate python interpreter found." >&2
exit 1
":"""

I do have the python interpreter installed:

>python -V
Python 2.7.5

Is there a way to tell if there's some python library missing, or in some way see an error message that indicates what the problem is?

EDIT:

Output from bash -x:

>bash -x ./bin/cqlsh
+ :
+ python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 0x03000000))'
+ exec python ./bin/cqlsh

EDIT: Value of sys.hexversion:

>python -c "import sys; print sys.hexversion"
34014704

EDIT:

>python -v ./bin/cqlsh 2>&1 | grep -v "^#" | grep -v "^import"
Python 2.7.5 (default, Oct  2 2013, 22:34:09)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.7/lib-dynload/itertools.dll", 2);
dlopen("/usr/lib/python2.7/lib-dynload/_functools.dll", 2);
dlopen("/usr/lib/python2.7/lib-dynload/_ctypes.dll", 2);
dlopen("/usr/lib/python2.7/lib-dynload/_struct.dll", 2);

EDIT: strace results:

>strace -o /usr/bin/python ./bin/cqlsh
strace.exe: can't open /usr/bin/python: Permission denied

>ll /usr/bin/python2.7.exe
-rwxr-xr-x 1 dabrans2 Domain Users 7187 Oct  2  2013 /usr/bin/python2.7.exe*

strace -o /usr/bin/python ./bin/cqlsh
strace.exe: can't open /usr/bin/python: Permission denied

After that, I opened Explorer and double-clicked on python2.7.exe. Windows said, "C:\sygwin64\bin\python2.7.exe is not a valid Win32 application." However, python3.2m.exe runs just fine with a double-click. Perhaps uninstalling python 2.7 will fix the issue.

来源:https://stackoverflow.com/questions/24871787/cqlsh-under-cygwin-fails-without-an-error-message

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!