2011-02-18 21 views
0

私はちょうどGoogleアプリケーションエンジンを使い始めていて、チュートリアルを始めたばかりです。私がこれをするとき:Google App Engine - Hello Worldチュートリアル - セグメンテーションフォールト

$ python2.5 google_appengine/dev_appserver.py helloworld/ 

「セグメンテーションフォールト」と言います。

私はUbuntu 10.10を実行しています。私はthis siteの助けを借りてサイトからPython 2.5をインストールしました。

私のコマンドの冒頭にpython2.5があるのは、Python 2.5のaltinstallを実行したので、まだPython 2.7を使用できることです。

すべてが動作するはずですが、そうではありません。誰も私の問題が何であるか知っていますか?

私はPython 2.5を対話的に実行することができます。 dev_appserver.pyを実行してsegフォールトが発生したときだけです。私はもっ​​と多くのテストを行いました。でも、実行しただけでも:

$ ./google_appengine/dev_appserver.py 

それは私にsegフォールトを与えます。これが助けになるかどうかはわかりませんが、私はそれを考えました。

私は冗長出力でそれを実行しました:私は冗長な出力を調べて、一番下の行を指摘

# installing zipimport hook 
import zipimport # builtin 
# installed zipimport hook 
# /usr/local/lib/python2.5/site.pyc matches /usr/local/lib/python2.5/site.py 
import site # precompiled from /usr/local/lib/python2.5/site.pyc 
# /usr/local/lib/python2.5/os.pyc matches /usr/local/lib/python2.5/os.py 
import os # precompiled from /usr/local/lib/python2.5/os.pyc 
import errno # builtin 
import posix # builtin 
# /usr/local/lib/python2.5/posixpath.pyc matches /usr/local/lib/python2.5/posixpath.py 
import posixpath # precompiled from /usr/local/lib/python2.5/posixpath.pyc 
# /usr/local/lib/python2.5/stat.pyc matches /usr/local/lib/python2.5/stat.py 
import stat # precompiled from /usr/local/lib/python2.5/stat.pyc 
# /usr/local/lib/python2.5/UserDict.pyc matches /usr/local/lib/python2.5/UserDict.py 
import UserDict # precompiled from /usr/local/lib/python2.5/UserDict.pyc 
# /usr/local/lib/python2.5/copy_reg.pyc matches /usr/local/lib/python2.5/copy_reg.py 
import copy_reg # precompiled from /usr/local/lib/python2.5/copy_reg.pyc 
# /usr/local/lib/python2.5/types.pyc matches /usr/local/lib/python2.5/types.py 
import types # precompiled from /usr/local/lib/python2.5/types.pyc 
import _types # builtin 
# /usr/local/lib/python2.5/warnings.pyc matches /usr/local/lib/python2.5/warnings.py 
import warnings # precompiled from /usr/local/lib/python2.5/warnings.pyc 
# /usr/local/lib/python2.5/linecache.pyc matches /usr/local/lib/python2.5/linecache.py 
import linecache # precompiled from /usr/local/lib/python2.5/linecache.pyc 
import encodings # directory /usr/local/lib/python2.5/encodings 
# /usr/local/lib/python2.5/encodings/__init__.pyc matches /usr/local/lib/python2.5/encodings/__init__.py 
import encodings # precompiled from /usr/local/lib/python2.5/encodings/__init__.pyc 
# /usr/local/lib/python2.5/codecs.pyc matches /usr/local/lib/python2.5/codecs.py 
import codecs # precompiled from /usr/local/lib/python2.5/codecs.pyc 
import _codecs # builtin 
# /usr/local/lib/python2.5/encodings/aliases.pyc matches /usr/local/lib/python2.5/encodings/aliases.py 
import encodings.aliases # precompiled from /usr/local/lib/python2.5/encodings/aliases.pyc 
# /usr/local/lib/python2.5/encodings/utf_8.pyc matches /usr/local/lib/python2.5/encodings/utf_8.py 
import encodings.utf_8 # precompiled from /usr/local/lib/python2.5/encodings/utf_8.pyc 
Python 2.5.5 (r255:77872, Feb 17 2011, 21:03:23) 
[GCC 4.4.5] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
import google # directory /home/admin/google_app_engine/google_appengine/google 
# /home/admin/google_app_engine/google_appengine/google/__init__.pyc matches /home/admin/google_app_engine/google_appengine/google/__init__.py 
import google # precompiled from /home/admin/google_app_engine/google_appengine/google/__init__.pyc 
import google.appengine # directory /home/admin/google_app_engine/google_appengine/google/appengine 
# /home/admin/google_app_engine/google_appengine/google/appengine/__init__.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/__init__.py 
import google.appengine # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/__init__.pyc 
import google.appengine.tools # directory /home/admin/google_app_engine/google_appengine/google/appengine/tools 
# /home/admin/google_app_engine/google_appengine/google/appengine/tools/__init__.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/tools/__init__.py 
import google.appengine.tools # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/tools/__init__.pyc 
# /home/admin/google_app_engine/google_appengine/google/appengine/tools/os_compat.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/tools/os_compat.py 
import google.appengine.tools.os_compat # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/tools/os_compat.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/time.so", 2); 
import time # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/time.so 
# /usr/local/lib/python2.5/getopt.pyc matches /usr/local/lib/python2.5/getopt.py 
import getopt # precompiled from /usr/local/lib/python2.5/getopt.pyc 
import logging # directory /usr/local/lib/python2.5/logging 
# /usr/local/lib/python2.5/logging/__init__.pyc matches /usr/local/lib/python2.5/logging/__init__.py 
import logging # precompiled from /usr/local/lib/python2.5/logging/__init__.pyc 
# /usr/local/lib/python2.5/string.pyc matches /usr/local/lib/python2.5/string.py 
import string # precompiled from /usr/local/lib/python2.5/string.pyc 
# /usr/local/lib/python2.5/re.pyc matches /usr/local/lib/python2.5/re.py 
import re # precompiled from /usr/local/lib/python2.5/re.pyc 
# /usr/local/lib/python2.5/sre_compile.pyc matches /usr/local/lib/python2.5/sre_compile.py 
import sre_compile # precompiled from /usr/local/lib/python2.5/sre_compile.pyc 
import _sre # builtin 
# /usr/local/lib/python2.5/sre_constants.pyc matches /usr/local/lib/python2.5/sre_constants.py 
import sre_constants # precompiled from /usr/local/lib/python2.5/sre_constants.pyc 
# /usr/local/lib/python2.5/sre_parse.pyc matches /usr/local/lib/python2.5/sre_parse.py 
import sre_parse # precompiled from /usr/local/lib/python2.5/sre_parse.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/strop.so", 2); 
import strop # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/strop.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/cStringIO.so", 2); 
import cStringIO # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/cStringIO.so 
# /usr/local/lib/python2.5/traceback.pyc matches /usr/local/lib/python2.5/traceback.py 
import traceback # precompiled from /usr/local/lib/python2.5/traceback.pyc 
import thread # builtin 
# /usr/local/lib/python2.5/threading.pyc matches /usr/local/lib/python2.5/threading.py 
import threading # precompiled from /usr/local/lib/python2.5/threading.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/collections.so", 2); 
import collections # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/collections.so 
# /usr/local/lib/python2.5/atexit.pyc matches /usr/local/lib/python2.5/atexit.py 
import atexit # precompiled from /usr/local/lib/python2.5/atexit.pyc 
# /usr/local/lib/python2.5/tempfile.pyc matches /usr/local/lib/python2.5/tempfile.py 
import tempfile # precompiled from /usr/local/lib/python2.5/tempfile.pyc 
# /usr/local/lib/python2.5/random.pyc matches /usr/local/lib/python2.5/random.py 
import random # precompiled from /usr/local/lib/python2.5/random.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/math.so", 2); 
import math # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/math.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/binascii.so", 2); 
import binascii # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/binascii.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/_random.so", 2); 
import _random # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/_random.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/fcntl.so", 2); 
import fcntl # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/fcntl.so 
import google.appengine.api # directory /home/admin/google_app_engine/google_appengine/google/appengine/api 
# /home/admin/google_app_engine/google_appengine/google/appengine/api/__init__.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/api/__init__.py 
import google.appengine.api # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/api/__init__.pyc 
# /home/admin/google_app_engine/google_appengine/google/appengine/api/yaml_errors.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/api/yaml_errors.py 
import google.appengine.api.yaml_errors # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/api/yaml_errors.pyc 
import google.appengine.dist # directory /home/admin/google_app_engine/google_appengine/google/appengine/dist 
# /home/admin/google_app_engine/google_appengine/google/appengine/dist/__init__.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/dist/__init__.py 
import google.appengine.dist # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/dist/__init__.pyc 
# /home/admin/google_app_engine/google_appengine/google/appengine/dist/_library.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/dist/_library.py 
import google.appengine.dist._library # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/dist/_library.pyc 
import distutils # directory /usr/local/lib/python2.5/distutils 
# /usr/local/lib/python2.5/distutils/__init__.pyc matches /usr/local/lib/python2.5/distutils/__init__.py 
import distutils # precompiled from /usr/local/lib/python2.5/distutils/__init__.pyc 
# /usr/local/lib/python2.5/distutils/version.pyc matches /usr/local/lib/python2.5/distutils/version.py 
import distutils.version # precompiled from /usr/local/lib/python2.5/distutils/version.pyc 
# /home/admin/google_app_engine/google_appengine/google/appengine/dist/py_zipimport.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/dist/py_zipimport.py 
import google.appengine.dist.py_zipimport # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/dist/py_zipimport.pyc 
# /usr/local/lib/python2.5/zipfile.pyc matches /usr/local/lib/python2.5/zipfile.py 
import zipfile # precompiled from /usr/local/lib/python2.5/zipfile.pyc 
# /usr/local/lib/python2.5/struct.pyc matches /usr/local/lib/python2.5/struct.py 
import struct # precompiled from /usr/local/lib/python2.5/struct.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/_struct.so", 2); 
import _struct # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/_struct.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/zlib.so", 2); 
import zlib # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/zlib.so 
# /home/admin/google_app_engine/google_appengine/google/appengine/tools/appcfg.pyc matches /home/admin/google_app_engine/google_appengine/google/appengine/tools/appcfg.py 
import google.appengine.tools.appcfg # precompiled from /home/admin/google_app_engine/google_appengine/google/appengine/tools/appcfg.pyc 
# /usr/local/lib/python2.5/calendar.pyc matches /usr/local/lib/python2.5/calendar.py 
import calendar # precompiled from /usr/local/lib/python2.5/calendar.pyc 
# /usr/local/lib/python2.5/__future__.pyc matches /usr/local/lib/python2.5/__future__.py 
import __future__ # precompiled from /usr/local/lib/python2.5/__future__.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/datetime.so", 2); 
import datetime # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/datetime.so 
# /usr/local/lib/python2.5/locale.pyc matches /usr/local/lib/python2.5/locale.py 
import locale # precompiled from /usr/local/lib/python2.5/locale.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/_locale.so", 2); 
import _locale # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/_locale.so 
dlopen("/usr/local/lib/python2.5/lib-dynload/operator.so", 2); 
import operator # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/operator.so 
# /usr/local/lib/python2.5/getpass.pyc matches /usr/local/lib/python2.5/getpass.py 
import getpass # precompiled from /usr/local/lib/python2.5/getpass.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/termios.so", 2); 
import termios # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/termios.so 
# /usr/local/lib/python2.5/mimetypes.pyc matches /usr/local/lib/python2.5/mimetypes.py 
import mimetypes # precompiled from /usr/local/lib/python2.5/mimetypes.pyc 
# /usr/local/lib/python2.5/urllib.pyc matches /usr/local/lib/python2.5/urllib.py 
import urllib # precompiled from /usr/local/lib/python2.5/urllib.pyc 
# /usr/local/lib/python2.5/socket.pyc matches /usr/local/lib/python2.5/socket.py 
import socket # precompiled from /usr/local/lib/python2.5/socket.pyc 
import _socket # builtin 
import _ssl # builtin 
# /usr/local/lib/python2.5/urlparse.pyc matches /usr/local/lib/python2.5/urlparse.py 
import urlparse # precompiled from /usr/local/lib/python2.5/urlparse.pyc 
# /usr/local/lib/python2.5/optparse.pyc matches /usr/local/lib/python2.5/optparse.py 
import optparse # precompiled from /usr/local/lib/python2.5/optparse.pyc 
# /usr/local/lib/python2.5/textwrap.pyc matches /usr/local/lib/python2.5/textwrap.py 
import textwrap # precompiled from /usr/local/lib/python2.5/textwrap.pyc 
# /usr/local/lib/python2.5/gettext.pyc matches /usr/local/lib/python2.5/gettext.py 
import gettext # precompiled from /usr/local/lib/python2.5/gettext.pyc 
# /usr/local/lib/python2.5/copy.pyc matches /usr/local/lib/python2.5/copy.py 
import copy # precompiled from /usr/local/lib/python2.5/copy.pyc 
# /usr/local/lib/python2.5/sha.pyc matches /usr/local/lib/python2.5/sha.py 
import sha # precompiled from /usr/local/lib/python2.5/sha.pyc 
# /usr/local/lib/python2.5/hashlib.pyc matches /usr/local/lib/python2.5/hashlib.py 
import hashlib # precompiled from /usr/local/lib/python2.5/hashlib.pyc 
dlopen("/usr/local/lib/python2.5/lib-dynload/_hashlib.so", 2); 
import _hashlib # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/_hashlib.so 
Segmentation fault 

は、だから私はカップルより多くのテストを実行した、と私は、Pythonを実行したときに

import _hashlib # dynamically loaded from /usr/local/lib/python2.5/lib-dynload/_hashlib.so 

ました2.5インタラクティブに、_hashlibモジュールをインポートしようとしました、それは働いた、エラーはなかった。

また、this blogに行って、彼のアプローチを試みました。これはどちらもうまくいかなかった。

答えて

0

申し訳ありませんが、担当者にコメントを残す必要はありませんので、これを回答として残す必要があります。

あなたのGoogleアプリケーションエンジンのインストールが壊れていないことを確認したと仮定すると、私の最初の本能はpython2.5のインストールでpython2.7のいくつかのファイルを使用してsegfaultになってしまうことです。 strace -o "log.txt" python2.5 ./google_appengine/dev_appserver.pyを実行してみてください。これにより、log.txtに大量の出力が得られますので、greppingを実行して2.7インストールからロードされているファイルを探してください。

何も起こらない場合は、gdbで実行してスタックトレースを取得してください。これは、シンボルをデバッグしているPythonインタプリタをインストールする必要があります。おそらくあなたが聞きたいものではありませんが、何が起こっているのかを知る最も簡単な方法です。ここにある指示:http://wiki.python.org/moin/DebuggingWithGdbスタックトレースで何が起きているのか分からない場合は、Pythonメーリングリストやバグトラッカーに投稿してください。

関連する問題