cakephpを使ってアプリを開発しようとしています。サーバーはvagrantを使っており,OSはcentos7です。
[vagrant@localhost myapp]$ bin/cake server -H 192.168.33.10 -p 8000
で簡易サーバーを立ち上げようとしたところ、
PHP Warning: require(/home/vagrant/cake1/myapp/vendor/autoload.php): failed to open stream: No such file or directory in /home/vagrant/cake1/myapp/bin/cake.php on line 5 PHP Fatal error: require(): Failed opening required '/home/vagrant/cake1/myapp/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/vagrant/cake1/myapp/bin/cake.php on line 5
と出ました。vendorの中はemptyになっていました。
対処法を教えて欲しいです。よろしくお願いいたします。
【追記】
php composer.phar install した時のエラー
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 - cakephp/cakephp-codesniffer 3.0.0 requires squizlabs/php_codesniffer ^3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3]. - cakephp/cakephp-codesniffer 3.0.1 requires squizlabs/php_codesniffer ^3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3]. - cakephp/cakephp-codesniffer 3.0.2 requires squizlabs/php_codesniffer ~3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2]. - cakephp/cakephp-codesniffer 3.0.3 requires squizlabs/php_codesniffer ^3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3]. - squizlabs/php_codesniffer 3.2.3 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.2.2 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.2.1 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.2.0 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.1.1 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.1.0 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.0.2 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.0.1 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - squizlabs/php_codesniffer 3.0.0 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system. - Installation request for cakephp/cakephp-codesniffer ^3.0 -> satisfiable by cakephp/cakephp-codesniffer[3.0.0, 3.0.1, 3.0.2, 3.0.3]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php.ini - /etc/php.d/20-bz2.ini - /etc/php.d/20-calendar.ini - /etc/php.d/20-ctype.ini - /etc/php.d/20-curl.ini - /etc/php.d/20-exif.ini - /etc/php.d/20-fileinfo.ini - /etc/php.d/20-ftp.ini - /etc/php.d/20-gd.ini - /etc/php.d/20-gettext.ini - /etc/php.d/20-iconv.ini - /etc/php.d/20-intl.ini - /etc/php.d/20-json.ini - /etc/php.d/20-mbstring.ini - /etc/php.d/20-pdo.ini - /etc/php.d/20-phar.ini - /etc/php.d/20-sockets.ini - /etc/php.d/20-sqlite3.ini - /etc/php.d/20-tokenizer.ini - /etc/php.d/30-pdo_sqlite.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
phpのバージョンは 7.0.29で、composer.jsonの内容は
{ "name": "cakephp/app", "description": "CakePHP skeleton app", "homepage": "https://cakephp.org", "type": "project", "license": "MIT", "require": { "php": ">=5.6", "cakephp/cakephp": "3.5.*", "cakephp/migrations": "^1.0", "cakephp/plugin-installer": "^1.0", "josegonzalez/dotenv": "2.*", "mobiledetect/mobiledetectlib": "2.*" }, "require-dev": { "cakephp/bake": "^1.1", "cakephp/cakephp-codesniffer": "^3.0", "cakephp/debug_kit": "^3.2", "psy/psysh": "@stable" }, "suggest": { "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.", "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.", "phpunit/phpunit": "Allows automated tests to be run without system-wide install.", "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP." }, "autoload": { "psr-4": { "App\": "src/" } }, "autoload-dev": { "psr-4": { "App\Test\": "tests/", "Cake\Test\": "vendor/cakephp/cakephp/tests/" } }, "scripts": { "post-install-cmd": "App\Console\Installer::postInstall", "post-create-project-cmd": "App\Console\Installer::postInstall", "post-autoload-dump": "Cake\Composer\Installer\PluginInstaller::postAutoloadDump", "check": [ "@test", "@cs-check" ], "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests", "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests", "test": "phpunit --colors=always" }, "prefer-stable": true, "config": { "sort-packages": true } }
です。

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/10 07:04
2018/04/10 07:13
2018/04/10 07:17
2018/04/10 09:03
2018/04/10 09:13
2018/04/10 09:14
2018/04/10 12:01 編集
2018/04/11 00:36
退会済みユーザー
2018/04/11 00:49
2018/04/11 00:53 編集
退会済みユーザー
2018/04/11 00:57
2018/04/11 01:02
2018/04/11 01:14
2018/04/11 01:21