我是laravel框架甚至网站开发的绝对初学者。
我的PHP版本是5.6。 我在我的Amazon Linux服务器上安装laravel框架时遇到了麻烦。
以下是我遇到的第一个错误。
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.39 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.38 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.37 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.35 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.34 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.33 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.32 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.31 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.30 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.27 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.26 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.25 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.24 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.23 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.22 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.20 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.18 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.12 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.11 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15, v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.30, v5.2.31, v5.2.32, v5.2.33, v5.2.34, v5.2.35, v5.2.36, v5.2.37, v5.2.38, v5.2.39, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php.ini
- /etc/php-5.6.d/20-bz2.ini
- /etc/php-5.6.d/20-calendar.ini
- /etc/php-5.6.d/20-ctype.ini
- /etc/php-5.6.d/20-curl.ini
- /etc/php-5.6.d/20-dom.ini
- /etc/php-5.6.d/20-exif.ini
- /etc/php-5.6.d/20-fileinfo.ini
- /etc/php-5.6.d/20-ftp.ini
- /etc/php-5.6.d/20-gettext.ini
- /etc/php-5.6.d/20-iconv.ini
- /etc/php-5.6.d/20-phar.ini
- /etc/php-5.6.d/20-posix.ini
- /etc/php-5.6.d/20-shmop.ini
- /etc/php-5.6.d/20-simplexml.ini
- /etc/php-5.6.d/20-sockets.ini
- /etc/php-5.6.d/20-sysvmsg.ini
- /etc/php-5.6.d/20-sysvsem.ini
- /etc/php-5.6.d/20-sysvshm.ini
- /etc/php-5.6.d/20-tokenizer.ini
- /etc/php-5.6.d/20-xml.ini
- /etc/php-5.6.d/20-xmlwriter.ini
- /etc/php-5.6.d/20-xsl.ini
- /etc/php-5.6.d/20-zip.ini
- /etc/php-5.6.d/30-wddx.ini
- /etc/php-5.6.d/30-xmlreader.ini
- /etc/php-5.6.d/40-json.ini
- /etc/php-5.6.d/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
经过多次研究,似乎我必须取消注释行“extension = php.mbstring.dll 。所以我试图找到它,但我的php.ini文件AWS服务器甚至没有该行。然后我自己放线,但现在我必须处理不同的错误。
我不知道该怎么做了。以前有没有人遇到类似这样的问题?如果你有,你能帮我解决这个问题吗?
我的英语不是我的第一语言,所以如果这篇文章没有意义或者您需要更多信息,请告诉我!
任何建议将不胜感激!提前谢谢!
答案 0 :(得分:0)
你需要PHP exstion mbstring。
//if your using ubuntu or debian
sudo apt-get install libapache2-mod-php5
//or if your using centos this should install it
yum install php
答案 1 :(得分:0)
如上所述,唯一的问题是您还没有在Linux机器上启用mbstring扩展。由于您已经安装了php5.6,因此您需要执行以下命令:
sudo apt-get install php5.6-mbstring
- >安装php5.6的mbstring扩展
systemctl restart apache2
或sudo service apache2 restart
- >重新启动服务器以应用更改
那应该解决它。