甘肃省通信管理局网站,管理系统admin入口,好玩的页游,南京越城建设集团网站在centos6.0上测试安装#xff0c;安装前准备工作#xff1a;###############################################################################服务器如果没有安装Jpeg v6b、libPng、FreeType 的要在安装imagemagick之前先装好#xff0c;否则imagemagick没法读取jpeg和p…在centos6.0上测试安装安装前准备工作###############################################################################服务器如果没有安装Jpeg v6b、libPng、FreeType 的要在安装imagemagick之前先装好否则imagemagick没法读取jpeg和png图片字体文件也读不了.python的版本须2.6需要升级python 能在/usr/include/pythonX/下找到python.h文件yum install python-devel -yyum install ImageMagick* -yyum install ImageMagick-devel ImageMagick-c ImageMagick-c-devel -y ****校验一下 解决找不到MagickCore问题查看ImageMagick的版本号convert -version安装或升级boostyum install boost*yum install boost-python ##校验boost-python是否安装###############################################################################安装PythonMagickPythonMagick的下载地址wget http://www.imagemagick.org/download/python/legacy/PythonMagick-0.9.3.tar.gzwget http://www.imagemagick.org/download/python/PythonMagick-0.9.7.tar.gztar zxvf PythonMagick-0.9.7.tar.gztar zxvf PythonMagick-0.9.3.tar.gzcd PythonMagick-0.9.7./autogen.plmkdir /usr/local/python./configure #2012.2.12进行到此步了make ##时间漫长耐心等待...出现一些的问题:_Image.cpp -fPIC -DPIC -o .libs/libpymagick_la-_Image.o_Image.cpp: In function ‘void Export_pyste_src_Image()’:_Image.cpp:89: error: address of overloaded function with no contextual type information_Image.cpp:90: error: address of overloaded function with no contextual type information_Image.cpp:97: error: address of overloaded function with no contextual type information_Image.cpp:114: error: address of overloaded function with no contextual type information.............make出错了就make clean然后解决办法从PythonMagick-0.9.3/pythonmagick_src/将以下文件cp到PythonMagick-0.9.7/pythonmagick_src/下覆盖原有的_Image.cpp_DrawableDashArray.cpp_DrawableMiterLimit.cpp_DrawableViewbox.cpp_Geometry.cpp参考http://www.geero.net/2011/03/install-pythonmagick-mac-os-x.html./autogen.pl./configuremake ##时间漫长耐心等待...在libtool: compile: g -DHAVE_CONFIG_H -I. -I../config -I/usr/include/python2.6 -I/usr/include -fopenmp -I/usr/include/ImageMagick -g -O2 -DBOOST_PYTHON_DYNAMIC_LIB -MT libpymagick_la-_Image.lo -MD -MP -MF .deps/libpymagick_la-_Image.Tpo -c _Image.cpp -fPIC -DPIC -o .libs/libpymagick_la-_Image.o的时候慢点让人无法忍受...干...make install成功安装后的正确提示Libraries have been installed in:/usr/local/lib64/python2.6/site-packages/PythonMagickIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the -LLIBDIRflag during linking and do at least one of the following:- add LIBDIR to the LD_LIBRARY_PATH environment variableduring execution- add LIBDIR to the LD_RUN_PATH environment variableduring linking- use the -Wl,-rpath -Wl,LIBDIR linker flag- have your system administrator add LIBDIR to /etc/ld.so.confSee any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.重要一步cp -rp /usr/local/lib64/python2.6/site-packages/PythonMagick/ /usr/lib64/python2.6/site-packages/PythonMagick/验证是否已经安装上了PythonMagick[rootlocalhost ~]# pythonPython 2.6.6 (r266:84292, Dec 7 2011, 20:48:22)[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2Type help, copyright, credits or license for more information. import PythonMagickimport无错误返回 表示模块 PythonMagick安装成功也可以[rootlocalhost ~]# pydoc -p2008pydoc server ready at http://localhost:2008/从浏览器看看支持的模块################################################################################################################################################################