linux(ubuntu)下编译安装cx_Freeze失败解决方法

今天准备把写好的Python程序打包,结果折腾了一天。先是想用pyinstaller,发现打包出来运行不了,应该是它在处理import时出了问题。于是考虑用cx freeze代替,结果在安装的时候就报错了,后来找到了解决办法。

先是从http://sourceforge.net/projects/cx-freeze/files/上下载cx_Freeze(版本4.3.3)的包

解压,执行:sudo python setup.py install

出现的错误如下:

adding base module named StringIO

adding base module named UserDict

adding base module named _abcoll

adding base module named _weakrefset

adding base module named abc

adding base module named base64

adding base module named codecs

adding base module named copy

adding base module named copy_reg

adding base module named encodings

adding base module named encodings.aliases

adding base module named encodings.ascii

adding base module named encodings.base64_codec

adding base module named encodings.big5

adding base module named encodings.big5hkscs

adding base module named encodings.bz2_codec

adding base module named encodings.charmap

adding base module named encodings.cp037

adding base module named encodings.cp1006

adding base module named encodings.cp1026

adding base module named encodings.cp1140

adding base module named encodings.cp1250

adding base module named encodings.cp1251

adding base module named encodings.cp1252

adding base module named encodings.cp1253

adding base module named encodings.cp1254

adding base module named encodings.cp1255

adding base module named encodings.cp1256

adding base module named encodings.cp1257

adding base module named encodings.cp1258

adding base module named encodings.cp424

adding base module named encodings.cp437

adding base module named encodings.cp500

adding base module named encodings.cp720

adding base module named encodings.cp737

adding base module named encodings.cp775

adding base module named encodings.cp850

adding base module named encodings.cp852

adding base module named encodings.cp855

adding base module named encodings.cp856

adding base module named encodings.cp857

adding base module named encodings.cp858

adding base module named encodings.cp860

adding base module named encodings.cp861

adding base module named encodings.cp862

adding base module named encodings.cp863

adding base module named encodings.cp864

adding base module named encodings.cp865

adding base module named encodings.cp866

adding base module named encodings.cp869

adding base module named encodings.cp874

adding base module named encodings.cp875

adding base module named encodings.cp932

adding base module named encodings.cp949

adding base module named encodings.cp950

adding base module named encodings.euc_jis_2004

adding base module named encodings.euc_jisx0213

adding base module named encodings.euc_jp

adding base module named encodings.euc_kr

adding base module named encodings.gb18030

adding base module named encodings.gb2312

adding base module named encodings.gbk

adding base module named encodings.hex_codec

adding base module named encodings.hp_roman8

adding base module named encodings.hz

adding base module named encodings.idna

adding base module named encodings.iso2022_jp

adding base module named encodings.iso2022_jp_1

adding base module named encodings.iso2022_jp_2

adding base module named encodings.iso2022_jp_2004

adding base module named encodings.iso2022_jp_3

adding base module named encodings.iso2022_jp_ext

adding base module named encodings.iso2022_kr

adding base module named encodings.iso8859_1

adding base module named encodings.iso8859_10

adding base module named encodings.iso8859_11

adding base module named encodings.iso8859_13

adding base module named encodings.iso8859_14

adding base module named encodings.iso8859_15

adding base module named encodings.iso8859_16

adding base module named encodings.iso8859_2

adding base module named encodings.iso8859_3

adding base module named encodings.iso8859_4

adding base module named encodings.iso8859_5

adding base module named encodings.iso8859_6

adding base module named encodings.iso8859_7

adding base module named encodings.iso8859_8

adding base module named encodings.iso8859_9

adding base module named encodings.johab

adding base module named encodings.koi8_r

adding base module named encodings.koi8_u

adding base module named encodings.latin_1

adding base module named encodings.mac_arabic

adding base module named encodings.mac_centeuro

adding base module named encodings.mac_croatian

adding base module named encodings.mac_cyrillic

adding base module named encodings.mac_farsi

adding base module named encodings.mac_greek

adding base module named encodings.mac_iceland

adding base module named encodings.mac_latin2

adding base module named encodings.mac_roman

adding base module named encodings.mac_romanian

adding base module named encodings.mac_turkish

adding base module named encodings.mbcs

adding base module named encodings.palmos

adding base module named encodings.ptcp154

adding base module named encodings.punycode

adding base module named encodings.quopri_codec

adding base module named encodings.raw_unicode_escape

adding base module named encodings.rot_13

adding base module named encodings.shift_jis

adding base module named encodings.shift_jis_2004

adding base module named encodings.shift_jisx0213

adding base module named encodings.string_escape

adding base module named encodings.tis_620

adding base module named encodings.undefined

adding base module named encodings.unicode_escape

adding base module named encodings.unicode_internal

adding base module named encodings.utf_16

adding base module named encodings.utf_16_be

adding base module named encodings.utf_16_le

adding base module named encodings.utf_32

adding base module named encodings.utf_32_be

adding base module named encodings.utf_32_le

adding base module named encodings.utf_7

adding base module named encodings.utf_8

adding base module named encodings.utf_8_sig

adding base module named encodings.uu_codec

adding base module named encodings.zlib_codec

adding base module named genericpath

adding base module named linecache

adding base module named os

adding base module named posixpath

adding base module named quopri

adding base module named repr

adding base module named stat

adding base module named stringprep

adding base module named struct

adding base module named traceback

adding base module named types

adding base module named warnings

adding base module named weakref

running install

running bdist_egg

running egg_info

creating cx_Freeze.egg-info

writing cx_Freeze.egg-info/PKG-INFO

writing top-level names to cx_Freeze.egg-info/top_level.txt

writing dependency_links to cx_Freeze.egg-info/dependency_links.txt

writing cx_Freeze.egg-info/PKG-INFO

writing top-level names to cx_Freeze.egg-info/top_level.txt

writing dependency_links to cx_Freeze.egg-info/dependency_links.txt

writing manifest file ‘cx_Freeze.egg-info/SOURCES.txt’

reading manifest file ‘cx_Freeze.egg-info/SOURCES.txt’

reading manifest template ‘MANIFEST.in’

writing manifest file ‘cx_Freeze.egg-info/SOURCES.txt’

installing library code to build/bdist.linux-x86_64/egg

running install_lib

running build_py

running build_ext

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibuild/temp.linux-x86_64-2.7 -I/usr/include/python2.7 -c source/bases/Console.c -o build/temp.linux-x86_64-2.7/source/bases/Console.o

x86_64-linux-gnu-gcc -pthread build/temp.linux-x86_64-2.7/source/bases/Console.o -o build/lib.linux-x86_64-2.7/cx_Freeze/bases/Console -s

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘GetImporterHelper’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:211:对‘PyObject_CallMethod’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:215:对‘PyErr_Clear’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘GetDirName’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:66:对‘PyString_FromStringAndSize’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘SetExecutableName’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:93:对‘PyString_FromString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:115:对‘PyString_FromStringAndSize’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:136:对‘PyString_FromString’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘SetExecutableName’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:155:对‘PyString_FromString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:167:对‘PyString_FromString’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘SetExecutableName’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:102:对‘PyExc_OSError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:102:对‘PyErr_SetFromErrnoWithFilename’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘main’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:64:对‘Py_NoSiteFlag’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:65:对‘Py_FrozenFlag’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:66:对‘Py_IgnoreEnvironmentFlag’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:67:对‘PyImport_FrozenModules’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:93:对‘Py_SetPythonHome’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:95:对‘Py_SetProgramName’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:96:对‘Py_GetProgramFullPath’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:97:对‘Py_Initialize’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:98:对‘PySys_SetArgv’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘SetPathToSearch’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:186:对‘PySys_GetObject’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:189:对‘PyList_Insert’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:191:对‘PyList_Insert’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:193:对‘PyList_Insert’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:195:对‘PyList_Insert’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘GetImporter’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:231:对‘PyImport_ImportModule’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘ExecuteScript’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:295:对‘PyDict_New’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘PopulateInitScriptDict’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:256:对‘PyEval_GetBuiltins’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:256:对‘PyDict_SetItemString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:258:对‘PyDict_SetItemString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:260:对‘PyDict_SetItemString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:262:对‘PyDict_SetItemString’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:265:对‘PyDict_SetItemString’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:268: more undefined references to `PyDict_SetItemString’ follow

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘ExecuteScript’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:303:对‘PyObject_CallMethod’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Common.c:307:对‘PyEval_EvalCode’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘main’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:105:对‘Py_Finalize’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:24:对‘PyErr_Print’未定义的引用

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:25:对‘Py_FatalError’未定义的引用

build/temp.linux-x86_64-2.7/source/bases/Console.o:在函数‘FatalScriptError’中:

/home/bill/Downloads/cx_Freeze-4.3.3/source/bases/Console.c:36:对‘PyErr_Print’未定义的引用

collect2: error: ld returned 1 exit status

error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

然后在其bitbucket上发现了如下issue:https://bitbucket.org/anthony_tuininga/cx_freeze/issues/32/cant-compile-cx_freeze-in-ubuntu-1304

解决方法

把安装文件setup.py里的

if not vars.get("Py_ENABLE_SHARED", 0):

改成

if True:

修改后可以成功安装,成功解决问题。

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-10-25 17:12:47

linux(ubuntu)下编译安装cx_Freeze失败解决方法的相关文章

Ubuntu 下编译安装linux

1. 准备工作切换为管理员权限,sudo –i 输入用户密码 进入root 权限apt-get install build-essential kernel-package libncurses5-dev libqt3-headersbuild-essential (基本的编程库(gcc, make 等)kernel-package (Debian 系统里生成 kernel-image 的一些配置文件和工具)libncurses5-dev (meke menuconfig 要调用的) libqt

Ubuntu下编译安装QEMU

Ubuntu下编译安装QEMU 由于环境需求,今天在ubuntu14.04的环境下手动编译安装了QEMU2.1.2. QEMU下载地址:http://wiki.qemu-project.org/download/qemu-2.1.2.tar.bz2 具体下载及解压步骤这里就不在赘述了,主要就是说下环境准备的一些依赖包,编译QEMU最重要的就是gcc,所以我们要先把gcc安装上. [email protected]:~# apt-get install gcc-3.4 cpp-3.4 安装QEMU

linux 6下编译安装配置LAMP平台

LAMP(Linux- Apache-MySQL-PHP)网站架构是目前国际流行的Web框架,该框架包括:Linux操作系统,Apache网络服务器,MySQL数据库,Perl.PHP或者Python编程语言,所有组成产品均是开源软件,是国际上成熟的架构框架,很多流行的商业应用都是采取这个架构,和Java/J2EE架构相比,LAMP具有Web资源丰富.轻量.快速开发等特点,微软的.NET架构相比,LAMP具有通用.跨平台.高性能.低价格的优势,因此LAMP无论是性能.质量还是价格都是企业搭建网站

Linux 6 下编译安装 PHP 5.6

PHP(外文名:PHP: Hypertext Preprocessor,中文名:"超文本预处理器")是一种通用开源脚本语言.语法吸收了C语言.Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域.PHP以其开发源代码,免费,快捷,跨平台,高效,面向对象,强大的动态图像创建等功能深受广大开发者的喜爱.本文描述基于CentOS 6.7下编译安装PHP 5.6.9. 一.相关依赖包安装 1.演示环境 # more /etc/redhat-release CentOS rel

CentOS6下编译安装Python2.7.6方法

关于在CentOS6下编译安装Python2.7.6的方法非常的多了,小编以前也介绍过相关的文章了,下面一聚教程小编再来为各位介绍一下吧,希望文章能帮助到各位. CentOS下面Python在升级到2.7.6的时候,没有找到安装包直接安装,只能通过源代码编译的方式来安装Python 2.7.6版本.这篇是编译和安装Python2.7.6的过程记录. CentOS系统中安装了development tools.要编译安装Python,执行下面代码:  代码如下 复制代码 $ pushd /usr/

一、Ubuntu下编译安装Mysql5.0.45

一.编译安装Mysql5.0.45 在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.首先,第一步开始编译安装Mysql. 步骤: cd /usr/local/src,进入到文件夹中,这个文件夹用来保存所需使用的软件安装包. 接着键入"sudo wgethttp://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz"回车,如果

二、Ubuntu下编译安装Nginx1.8.0

    在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.首先,第二步开始编译安装Nginx1.8.0 1.先进入"/usr/local/src"文件夹中,接着键入 "sudo wget http://nginx.org/download/nginx-1.8.0.tar.gz"回车,等待下载完毕.下载完毕后,执行"sudo tar zxvf nginx-1.8.0

二、Ubuntu下编译安装PHP5.6.16

    在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.首先,第三步开始编译安装PHP5.6.16 1.先进入"/usr/local/src"文件夹中,接着键入 "sudo wget http://cn2.php.net/distributions/php-5.6.16.tar.gz"回车,等待下载完毕.下载完毕后,执行"sudo tar zxvf php-5.

三、Ubuntu下编译安装PHP5.6.16

    在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.首先,第三步开始编译安装PHP5.6.16 1.先进入"/usr/local/src"文件夹中,接着键入 "sudo wget http://cn2.php.net/distributions/php-5.6.16.tar.gz"回车,等待下载完毕.下载完毕后,执行"sudo tar zxvf php-5.