尝试将应用程序推入Bluemix时遇到此错误 使用LARAVEL Ver 5.3和PHP 7.0
您的要求无法解析为可安装的软件包。
Problem 1
- This package requires
php
>=5.6.4 but your PHP version (5.5.38) does not satisfy that requirement.
Problem 2
- laravel/framework v5.3.23 requires php >=5.6.4 -> your PHP version (5.5.38) does not satisfy that requirement.
- laravel/framework v5.3.23 requires php >=5.6.4 -> your PHP version (5.5.38) does not satisfy that requirement.
附加登台的完整输出:
Updated app with guid 99128c49-c374-407b-940d-c8842d8419f9 ({"buildpack"=>"https://github.com/cloudfoundry/php-buildpack", "name"=>"*****", "command"=>"PRIVATE DATA HIDDEN", "instances"=>1, "memory"=>512, "environment_json"=>"PRIVATE DATA HIDDEN"})
Updated app with guid 99128c49-c374-407b-940d-c8842d8419f9 ({"route"=>"d5d0cb3b-d428-4297-823d-8bfebd318b98"})
Updated app with guid 99128c49-c374-407b-940d-c8842d8419f9 ({"console"=>true, "state"=>"STOPPED"})
Got staging request for app with id 99128c49-c374-407b-940d-c8842d8419f9
Updated app with guid 99128c49-c374-407b-940d-c8842d8419f9 ({"console"=>true, "state"=>"STARTED"})
-----> Downloaded app package (132M)
Cloning into '/tmp/buildpacks/php-buildpack'...
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out '6fc96370a0c95fb3ac22d47a4436152a38bed540'
-------> Buildpack version 4.3.24
Installing HTTPD
HTTPD 2.4.23
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/httpd/httpd-2.4.23-linux-x64.tgz] to [/tmp]
Installing PHP
PHP 5.5.38
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php-5.5.38-linux-x64-1479852231.tgz] to [/tmp]
The extension 'tokenizer' is not provided by this buildpack.
The extension 'dom' is not provided by this
buildpack
.
The extension '
json
' is not provided by this
buildpack
.
The extension '
libxml
' is not provided by this
buildpack
.
The extension '
xml
' is not provided by this
buildpack
.
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php-5.5.38-linux-x64-1479852231.tgz] to [/tmp]
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/binaries/trusty/composer/1.2.4/composer.phar] to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 283 100 283 0 0 215 0 0:00:01 0:00:01 --:--:-- 215
Loading composer repositories with package information
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires
php
>=5.6.4 but your PHP version (5.5.38) does not satisfy that requirement.
Problem 2
- laravel/framework v5.3.23 requires php >=5.6.4 -> your PHP version (5.5.38) does not satisfy that requirement.
- laravel/framework v5.3.23 requires php >=5.6.4 -> your PHP version (5.5.38) does not satisfy that requirement.
- Installation request for laravel/framework v5.3.23 -> satisfiable by laravel/framework[v5.3.23].
Traceback (most recent call last):
-----> Composer command failed
File "/tmp/buildpacks/php-buildpack/scripts/compile.py", line 50, in <module>
.from_build_pack('lib/additional_commands')
File "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/builder.py", line 208, in extensions
process_extension(path, ctx, 'compile', process, args=[self])
File "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/utils.py", line 69, in process_extension
success(getattr(extn, to_call)(*args))
File "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 425, in compile
return composer.compile(install)
File "/tmp/buildpacks/php-buildpack/lib/extension_helpers.py", line 154, in compile
self._compile(install)
File "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 192, in _compile
self.run()
File "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 327, in run
*self._ctx['COMPOSER_INSTALL_OPTIONS'])
File "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 371, in run
shell=True)
File "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/runner.py", line 109, in stream_output
raise CalledProcessError(retcode, cmd)
build_pack_utils.runner.CalledProcessError: Command '<open file '<fdopen>', mode 'w' at 0x7f53abf406f0>' returned non-zero exit status 2
Staging failed: Buildpack compilation step failed
encountered error: App staging failed in the buildpack compile phase
在options.json中,尝试使用最新版本的PHP 7.0,它仍在使用版本5.5.38。
此外,尝试在本地运行composer更新。
是buildpack level问题吗?
任何解决方法?
答案 0 :(得分:1)
在声明在options.json文件中使用PHP 7.0最新版本时,您是否忘记包括大括号{}?
“PHP_VERSION”:“ { PHP_70_LATEST } ”
BP_DEBUG: true
并重新开始APP_DEBUG: true
并重新开始。当您点击应用的网址时,您将获得stacktrace信息。你可以找到一个具有Bluemix友好的Laravel 5.3代码库的骨架仓库,并使用PHP 7.x here进行部署。
要部署,只需
git clone https://github.com/ibmjstart/Bluemix-Laravel-Demo cd Bluemix-Laravel-Demo cf push
希望这有助于说明让您入门的机制。