linux – 如何在ubuntu 16.04中安装laravel 5.6?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux – 如何在ubuntu 16.04中安装laravel 5.6?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2598字,纯文字阅读大概需要4分钟。
内容图文
![linux – 如何在ubuntu 16.04中安装laravel 5.6?](/upload/InfoBanner/zyjiaocheng/970/fa07d789d4474c018eace664a354a6bc.jpg)
我用这个命令将PHP 7.0升级到7.1:
1. sudo add-apt-repository ppa:ondrej/php
2. sudo apt-get update
3. sudo apt-get install php7.1
并从laravel.com运行此命令:
作曲家创作项目–prefer-dist laravel / laravel博客
运行此代码后,出现以下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.6.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework 5.6.x-dev requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[5.6.x-dev, v5.6.0].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.1/cli/php.ini
- /etc/php/7.1/cli/conf.d/10-opcache.ini
- /etc/php/7.1/cli/conf.d/10-pdo.ini
- /etc/php/7.1/cli/conf.d/20-calendar.ini
- /etc/php/7.1/cli/conf.d/20-ctype.ini
- /etc/php/7.1/cli/conf.d/20-exif.ini
- /etc/php/7.1/cli/conf.d/20-fileinfo.ini
- /etc/php/7.1/cli/conf.d/20-ftp.ini
- /etc/php/7.1/cli/conf.d/20-gettext.ini
- /etc/php/7.1/cli/conf.d/20-iconv.ini
- /etc/php/7.1/cli/conf.d/20-json.ini
- /etc/php/7.1/cli/conf.d/20-phar.ini
- /etc/php/7.1/cli/conf.d/20-posix.ini
- /etc/php/7.1/cli/conf.d/20-readline.ini
- /etc/php/7.1/cli/conf.d/20-shmop.ini
- /etc/php/7.1/cli/conf.d/20-sockets.ini
- /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.1/cli/conf.d/20-sysvsem.ini
- /etc/php/7.1/cli/conf.d/20-sysvshm.ini
- /etc/php/7.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
更新1:
我运行这个命令:
sudo apt-get install php7.1-mbstring
sudo apt-get install libapache2-mod-php7.1
afetr run composer create-project –prefer-dist laravel / laravel blog命令,显示错误:
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
Your configuration does not allow connection to http://packagist.org. See https://getcomposer.org/doc/06-config.md#secure-http for details.
如何解决这个错误?
解决方法:
你需要,
安装mbstring:
sudo apt-get install php7.1-mbstring
sudo apt-get install libapache2-mod-php7.1
然后,
重启你的服务器:
sudo service apache2 restart
or
sudo service nginx restart
要使用composer解决错误,请运行:
sudo composer self-update
sudo composer clear-cache
sudo composer config -g secure-http false
内容总结
以上是互联网集市为您收集整理的linux – 如何在ubuntu 16.04中安装laravel 5.6?全部内容,希望文章能够帮你解决linux – 如何在ubuntu 16.04中安装laravel 5.6?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。