How can I build extension compilation in the LAMP environment in Linux?

Source: Internet
Author: User
How can I build an extended compiling Linux: Ubuntu 14.04 in the LAMP environment in linux?
PHP 5.5
Php has been installed successfully and phpinfo () can be output. However, an error occurs during compilation and installation of PDO_MYSQL (the same problem occurs when compiling other extensions) the command I used to generate configure is sudo/usr/local/php/bin/phpize.
In this step, the system output is
Processing ING:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
Then I run the compilation Command:
Sudo./configure -- with-php-config =/usr/local/php/bin/php-config -- with-pdo_mysql
The php-config file path here is correct.
Then the system outputs the following information:

./Configure: line 1290: =: command not found

Export COLORTERM = "gnome-terminal"
Export CONFIG_SHELL = "/bin/bash"
Export DISPLAY = ": 0"
Export DUALCASE = "1"
Export HOME = "/home/prg"
Export LANG = "en_US.UTF-8"
Export LANGUAGE = "C"
Export LC_ADDRESS = "zh_CN.UTF-8"
Export LC_ALL = "C"
Export LC_IDENTIFICATION = "zh_CN.UTF-8"
Export LC_MEASUREMENT = "zh_CN.UTF-8"
Export LC_MONETARY = "zh_CN.UTF-8"
Export LC_NAME = "zh_CN.UTF-8"
Export LC_NUMERIC = "zh_CN.UTF-8"
Export LC_PAPER = "zh_CN.UTF-8"
Export LC_TELEPHONE = "zh_CN.UTF-8"
Export LC_TIME = "zh_CN.UTF-8"
Export LOGNAME = "root"
Export LS_COLORS = "rs = 0: di = 01; 34: ln = 01; 36: mh = 00: pi = 40; 33: so = 01; 35: do = 01; 35: bd = 40; 33; 01: cd = 40; 33; 01: or = 40; 31; 01: su = 37; 41: sg = 30; 43: ca = 30; 41: tw = 30; 42: ow = 34; 42: st = 37; 44: ex = 01; 32 :*. tar = 01; 31 :*. tgz = 01; 31 :*. arj = 01; 31 :*. taz = 01; 31 :*. lzh = 01; 31 :*. lzma = 01; 31 :*. tlz = 01; 31 :*. txz = 01; 31 :*. zip = 01; 31 :*. z = 01; 31 :*. Z = 01; 31 :*. dz = 01; 31 :*. gz = 01; 31 :*. lz = 01; 31 :*. xz = 01; 31 :*. bz2 = 01; 31 :*. bz = 01; 31 :*. tbz = 01; 31 :*. tbz2 = 01; 31 :*. tz = 01; 31 :*. deb = 01; 31 :*. rpm = 01; 31 :*. jar = 01; 31 :*. war = 01; 31 :*. ear = 01; 31 :*. sar = 01; 31 :*. rar = 01; 31 :*. ace = 01; 31 :*. zoo = 01; 31 :*. cpio = 01; 31 :*. 7z = 01; 31 :*. rz = 01; 31 :*. jpg = 01; 35 :*. jpeg = 01; 35 :*. gif = 01; 35 :*. bmp = 01; 35 :*. pbm = 01; 35 :*. pgm = 01; 35 :*. ppm = 01; 35 :*. tga = 01; 35 :*. xbm = 01; 35 :*. xpm = 01; 35 :*. tif = 01; 35 :*. tiff = 01; 35 :*. png = 01; 35 :*. svg = 01; 35 :*. svgz = 01; 35 :*. mng = 01; 35 :*. pcx = 01; 35 :*. mov = 01; 35 :*. mpg = 01; 35 :*. mpeg = 01; 35 :*. m2v = 01; 35 :*. mkv = 01; 35 :*. webm = 01; 35 :*. ogm = 01; 35 :*. mp4 = 01; 35 :*. m4v = 01; 35 :*. mp4v = 01; 35 :*. vob = 01; 35 :*. qt = 01; 35 :*. nuv = 01; 35 :*. wmv = 01; 35 :*. asf = 01; 35 :*. rm = 01; 35 :*. rmvb = 01; 35 :*. flc = 01; 35 :*. avi = 01; 35 :*. fli = 01; 35 :*. flv = 01; 35 :*. gl = 01; 35 :*. dl = 01; 35 :*. xcf = 01; 35 :*. xwd = 01; 35 :*. yuv = 01; 35 :*. cgm = 01; 35 :*. emf = 01; 35 :*. axv = 01; 35 :*. anx = 01; 35 :*. ogv = 01; 35 :*. ogx = 01; 35 :*. aac = 00; 36 :*. au = 00; 36 :*. flac = 00; 36 :*. mid = 00; 36 :*. midi = 00; 36 :*. mka = 00; 36 :*. mp3 = 00; 36 :*. mpc = 00; 36 :*. ogg = 00; 36 :*. ra = 00; 36 :*. wav = 00; 36 :*. axa = 00; 36 :*. oga = 00; 36 :*. spx = 00; 36 :*. xspf = 00; 36 :"
Export OLDPWD
Export PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Export PWD = "/home/prg/PHP/php-5.5.10/ext/pdo_mysql"
Export SHELL = "/bin/bash"
Export SHLVL = "1"
Export SUDO_COMMAND = "./configure -- with-php-config =/usr/local/php/bin/php-config -- with-pdo_mysql"
Export SUDO_GID = "1000"
Export SUDO_UID = "1000"
Export SUDO_USER = "prg"
Export TERM = "xterm"
Export USER = "root"
Export USERNAME = "root"
Export XAUTHORITY = "/var/run/mcm/auth-for-prg-NbD87m/database"
Export as_nl ="
"
Configure: WARNING: you shocould use -- build, -- host, -- target
Configure: WARNING: invalid host type:/usr/local/php/bin/php-config

Checking for grep that handles long lines and-e.../bin/grep
Checking for egrep.../bin/grep-E
Checking for a sed that does not truncate output.../bin/sed
Checking for/usr/local/php/bin/php-config-cc... no
Checking for/usr/local/php/bin/php-config-gcc... no
Checking for cc... cc
Checking for C compiler default output file name... a. out
Checking whether the C compiler works... yes
Checking whether we are cross compiling... no
Checking for suffix of executables...
Checking for suffix of object files... o
Checking whether we are using the gnu c compiler... yes
Checking whether cc accepts-g... yes
Checking for cc option to accept ISO c89... none needed
Checking how to run the C preprocessor... cc-E
Checking for icc... no
Checking for suncc... no
Checking whether cc understands-c and-o together... yes
Checking for system library directory... lib
Checking if compiler supports-R... no
Checking if compiler supports-Wl,-rpath,... yes
Checking build system type.../usr/local/php/bin/php-config

Configure: error: invalid value of canonical build

Finally, I stopped compilation of google baidu for a long time. I don't know how to solve the problem. because I don't know what's going on with linux, so I hope I can clearly describe the problem. thank you!


Reply to discussion (solution)

We recommend that you use apt-get install to automatically install the SDK. you do not need to compile the SDK yourself.

No one has installed ??? in the Ubuntu source code ??..

It's strange that you can restart the instance today. haha

It is estimated that the dependent database is updated after the instance is restarted.

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.