1

I have been trying to install a Python library called Polyglot, which in turn requires PyICU, the source of my woes. After a wild goose chase of errors, I was able to install PyICU on my EC2 instance. However, when running Polyglot, and in turn PyICU, I get the following error:

Traceback (most recent call last):
  File "/mnt/data/anaconda3/bin/polyglot", line 11, in <module>
    load_entry_point('polyglot==16.7.4', 'console_scripts', 'polyglot')()
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/polyglot/__main__.py", line 16, in <module>
    from icu import Locale
  File "/mnt/data/anaconda3/lib/python3.6/site-packages/icu/__init__.py", line 37, in <module>
    from _icu import *
ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/linuxbrew/.linuxbrew/lib/libstdc++.so.6)

To resolve the above issue, I performed the following steps:

mkdir ~/glibc_install; cd ~/glibc_install 
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxvf glibc-2.18.tar.gz
cd glibc-2.18
mkdir build
cd build
../configure --prefix=/opt/glibc-2.18
make -j4
make install
export LD_LIBRARY_PATH=/opt/glibc-2.18/lib

But then when I simply ran Python, I got an immediate segmentation fault.

Note that I am using Red Hat 7.1.2-2 on an AWS EC2.

Any help at all would be most appreciated!

4

1 回答 1

1
于 2019-02-09T17:38:54.350 回答