win pear php7.1,升级PHP7.1,Composer

2.解压

tar

3.configure

4.make && make install

如果出现如下报错

/ext/iconv/iconv.c:2465: undefined reference to `libiconv'

我个人的解决方案是 --without一下,这个模块我们可以后续的再给php去添加

[root@php-7.1.3]# mv php.ini-production /server/programs/php7.1/lib/php.ini

[root@php-7.1.3]# cd /server/programs/php7.1/

[root@php7.1]# ls

bin etc include lib php sbin var

[root@php7.1]# cd etc/

[root@etc]# ls

pear.conf php-fpm.conf.default php-fpm.d

[root@etc]# mv php-fpm.

php-fpm.conf.default php-fpm.d/

[root@etc]# mv php-fpm.conf.default php-fpm.conf

[root@etc]# vim php-fpm.

[root@etc]# vim php-fpm.conf

5.添加libiconv,添加zlib,

[root@iZ94568y7h9Z zlib]# /server/programs/php7.1/bin/phpize

Cannot find config.m4.

Make sure that you run '/server/programs/php7.1/bin/phpize' in the top level source directory of the module

[root@iZ94568y7h9Z zlib]# ll

total 112

-rw-rw-r-- 1 www www 1952 Mar 14 21:17 config0.m4

-rw-rw-r-- 1 www www 604 Mar 14 21:17 config.w32

-rw-rw-r-- 1 www www 84 Mar 14 21:17 CREDITS

-rw-rw-r-- 1 www www 1995 Mar 14 21:17 package.xml

-rw-rw-r-- 1 www www 921 Mar 14 21:17 php_zlib.def

-rw-rw-r-- 1 www www 2986 Mar 14 21:17 php_zlib.h

drwxrwxr-x 2 www www 12288 Mar 14 21:17 tests

-rw-rw-r-- 1 www www 46774 Mar 14 21:17 zlib.c

-rw-rw-r-- 1 www www 13167 Mar 14 21:17 zlib_filter.c

-rw-rw-r-- 1 www www 5262 Mar 14 21:17 zlib_fopen_wrapper.c

-rw-rw-r-- 1 www www 331 Mar 14 21:17 zlib_win32_howto.txt

[root@iZ94568y7h9Z zlib]# cp config0.m4 config.m4

[root@iZ94568y7h9Z zlib]# /server/programs/php7.1/bin/phpize

555df2191a41

Paste_Image.png

555df2191a41

Paste_Image.png

#make && make install

最后修改一下ini

6.安装composer

[root@bin]# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

[root@bin]# ./php composer-setup.php

555df2191a41

Paste_Image.png

添加软链接

555df2191a41

Paste_Image.png

新问题

[root@iZ94568y7h9Z cms_v1]# composer update

Do not run Composer as root/super user! See https://getcomposer.org/root for details

Loading composer repositories with package information

Updating dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

Problem 1

- hashids/hashids 2.0.3 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

- hashids/hashids 2.0.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

- hashids/hashids 2.0.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

- hashids/hashids 2.0.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

- lavalite/framework v2.1.2 requires hashids/hashids 2.0.* -> satisfiable by hashids/hashids[2.0.0, 2.0.1, 2.0.2, 2.0.3].

- Installation request for lavalite/framework 2.1.2 -> satisfiable by lavalite/framework[v2.1.2].

To enable extensions, verify that they are enabled in your .ini files:

- /server/programs/php7.1/lib/php.ini

You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

解决方案:

555df2191a41

Paste_Image.png

安装一下这个就行了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值