質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Apache

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

Laravel 5

Laravel 5は、PHPフレームワークLaravelの最新バージョンで、2014年11月に発表予定です。ディレクトリ構造がが現行版より大幅に変更されるほか、メソッドインジェクションやFormRequestの利用が可能になります。

VPS

VPS(バーチャル・プライベート・サーバ)は、仮想化されたサーバをレンタルするサービスで、共有サーバでありながら専門サーバと同等の機能を果たします。物理的な専門サーバより安価で提供できるメリットがあります。

Q&A

解決済

1回答

1583閲覧

さくらVPSのLAMP環境でLaravelがインストールできません。

rude_rockers

総合スコア32

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Apache

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

Laravel 5

Laravel 5は、PHPフレームワークLaravelの最新バージョンで、2014年11月に発表予定です。ディレクトリ構造がが現行版より大幅に変更されるほか、メソッドインジェクションやFormRequestの利用が可能になります。

VPS

VPS(バーチャル・プライベート・サーバ)は、仮想化されたサーバをレンタルするサービスで、共有サーバでありながら専門サーバと同等の機能を果たします。物理的な専門サーバより安価で提供できるメリットがあります。

0グッド

0クリップ

投稿2018/11/01 17:38

編集2018/11/01 18:25

さくらVPS
CentOS7
Apache 2.4
Mysql 5.7
PHP 7.2

「/var/www」下にLaravelのプロジェクトフォルダを置きたいと思っています。

composerをインストール

# curl -sS https://getcomposer.org/installer | php # mv composer.phar /usr/local/bin/composer

composerでlaravelをインストール

# composer global require "laravel/installer"

すると、

Changed current directory to /root/.config/composer Using version ^2.0 for laravel/installer ./composer.json has been updated 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 - laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system. - laravel/installer v2.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system. - Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1]. 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-json.ini - /etc/php.d/20-mbstring.ini - /etc/php.d/20-mysqlnd.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-mysqli.ini - /etc/php.d/30-pdo_mysql.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. Installation failed, reverting ./composer.json to its original content.

とでてインストールできません。

「php --ini」がどうのこうのと言っているように思えますが、よくわかりません。
アドバイスお願いします。

ちなみに強引にLaravelをインストールすると、

# composer create-project laravel/laravel laravel --prefer-dist

下記のような文がでて一応Laravelのフォルダが出来上がります。

Installing laravel/laravel (v5.7.0) - Installing laravel/laravel (v5.7.0): Downloading (100%) Created project in laravel > @php -r "file_exists('.env') || copy('.env.example', '.env');" 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 - phpunit/phpunit 7.5.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.4.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.4.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.4.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.4.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.5 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.3.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.7 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.6 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.5 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.5 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.4 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.0.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.0.2 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system. - phpunit/phpunit 7.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system. - Installation request for phpunit/phpunit ^7.0 -> satisfiable by phpunit/phpunit[7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.x-dev, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.x-dev, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.x-dev, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.3.x-dev, 7.4.0, 7.4.1, 7.4.2, 7.4.3, 7.4.x-dev, 7.5.x-dev]. 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-json.ini - /etc/php.d/20-mbstring.ini - /etc/php.d/20-mysqlnd.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-mysqli.ini - /etc/php.d/30-pdo_mysql.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 artisan --version」とすると、

PHP Warning: require(/var/www/laravel/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/laravel/artisan on line 18 PHP Fatal error: require(): Failed opening required '/var/www/laravel/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/laravel/artisan on line 18

となります。
そもそも「/var/www/laravel」内に「vendor」がありません。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

「php --ini」がどうのこうのと言っているように思えますが、よくわかりません。

英語が読めていないのか、読めてはいるが意味が分かっていないのか、指示内容を理解できてないのか分かりませんが、
Google翻訳にかけるか、エラーメッセージそのままで検索すれば良いです。

前提として「必ずどこかで誰かが同じエラーに直面している」ため、
きちんと探せばおおよそ幾つか解決策が出てくるものだからです。
特にエラーは。

「 the requested PHP extension」のようなエラーが出る場合は、
インストールしたいパッケージに必要なPHPのExtensionが不足している場合に起きます。

今回の場合「php-zip」が足りていないようです。
Qiitaに記事もありますよ。

投稿2018/11/01 22:53

m.ts10806

総合スコア80765

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

rude_rockers

2018/11/02 02:05

ありがとうございます! 翻訳にはかけるのですが、やはり意味がわかりませんでした・・・ 記事を見ながら勉強してみます!
m.ts10806

2018/11/02 02:25

全部かけてしまうと本来固有名詞のところも頑張って訳すこともあるのでそこは適当に置き換えて文脈を理解することを優先させると理解しやすくなると思います。 ツール側から払いだされたエラーであれば定型的なものですしね
rude_rockers

2018/11/02 02:40

なかなか手こずりましたが、「yum -y install --enablerepo=remi-php71 php-xml」でいけました! ちょっと調べ方がわかってきた気がします。 ありがとうございました!!!!
m.ts10806

2018/11/02 02:44

解決できたようで何よりです
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問