Whereis libjpeg.so.7

Source: Internet
Author: User

Call the import Imagefont times on the server the following error

Importerror:the _imagingft C module is not installed

(Server is Centos5.5, Python version 2.7.3)

The first reaction is a problem with PiL installation, via yum install Freetype-devel libjpeg-devel libpng-devel

Reinstall the dependent libraries, then uninstall PIL via Pip uninstall-y pil, then to http://effbot.org/downloads/ imaging-1.1.7.tar.gz Download the source package, modify set.py in Jpeg_root, Zlib_root,freetype_root and other paths, and then execute

Python setup.py build_ext-i

Python setup.py Build

Python setup.py Install

The problem is still the same after reinstalling.

Later accidentally found an article on the official website: http://effbot.org/zone/pil-imaging-not-installed.htm, some inspiration, first judge _imaging whether the normal installation, if the installation process without error, Under the PIL package should be able to find, my/usr/local/python-2.7.3/lib/python2.7/site-packages/pil/_imaging.so (filename suffix varies by operating system, such as _ Imaging.pyd or _imaging.dll), the next step is to determine if Python can find _imaging.so, which is found through the python-v, and then executes the debug message displayed by the import image _ Imaging.so whether to be imported, if this step is OK, it is _imaing.so itself problem, sure enough in Python execution: import _imaing, hint

»> Import _imaging

Traceback (most recent):

File "<stdin>", line 1, in <module>

Importerror:libjpeg.so.7:cannot open Shared object file:no such file or directory

Note The system cannot find the LIBJPEG.SO.7 library in the specified directory, and libjpeg is installed properly, Whereis libjpeg.so.7 can find the actual installation path (/usr/local/lib/ libjpeg.so.7), only need to build a soft link to the actual installation path under the system's search path (ln-s/usr/local/lib/libjpeg.so.7/usr/lib/)

Whereis libjpeg.so.7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.