0

我正在尝试在 Oracle 站点上运行 JavaServer Faces 教程:

http://docs.oracle.com/javaee/6/tutorial/gexaj.html

但是,当我在 Ubuntu Linux 12.04.2 LTS 上运行时,我得到以下信息:

$ updatetool
WX import error.  Verify the WX widgets are in the PYTHONPATH.
The following can be reported to GlassFish Update Tool 2.3.5 Development Team <dev@updatecenter.java.net>.

Traceback (innermost last):
  File "/home/johndoe/glassfish3/updatetool/vendor-packages/updatetool/common/boot.py", line 283, in init_app_locale
    import wx
  File "wx/__init__.py", line 45, in ?
  File "wx/_core.py", line 4, in ?
 ImportError: libjpeg.so.62: cannot open shared object file: No such file or directory

boot.py 的第 283 行有以下“import wx”语句:

try:
    # XXX : This still fails badly with segfault on bad locales
    import wx
except:
    typ, val, tback = sys.exc_info()
    if str(typ) == "locale.Error":
        if sys.platform not in ['win32'] and os.environ['LANG'] != 'C':
            UPDATETOOL_LOCALE = _set_unix_locale_vars('C')
            try:
                import wx  
            except: 
                # NOL10N 
                uc_error("The current locale is not supported and we could not fallback to english locale.", 1)
        else:
            # NOL10N
            uc_error("The current locale is not supported and we could not fallback to english locale.", 1)
    else:
        import traceback
        lst = traceback.format_tb(tback) + traceback.format_exception_only(typ, val)
        msgx = _("WX import error.  Verify the WX widgets are in the PYTHONPATH.\nThe following can be reported "\
                "to %(email)s.\n\nTraceback " \
                "(innermost last):\n%(tracefirst)-20s %(tracerest)s") % {'email':INFO.REPORT_TO, 'tracefirst': "".join(lst[:-1]), 'tracerest': lst[-1]}
        uc_error(msgx, 1)

_ = wx.GetTranslation

我正在运行 python 2.7.3。有谁知道如何解决这个错误?

4

1 回答 1

0

updatetool使用的是自带的32位版本的python,所以需要安装i386版本的libjpeg62:

sudo apt-get install libjpeg62:i386
于 2013-09-05T13:37:01.217 回答