Q&A
Laravel初心者です。
色々調べてみましたが詰んでしまいました。どなたかご助言いただけますでしょうか。
前提・実現したいこと
- CentOS7.4のVagrant環境でLaravelをインストールしたい
- Conflictが起きているが、そもそも起こさないようにしたい
類似エラーとして下記リンクを参考済
環境構築シェル(Apache,PHP部分抜粋)
## Apache yum -y install https://centos7.iuscommunity.org/ius-release.rpm yum --enablerepo=epel -y install nghttp2 yum -y install epel-release yum -y install mailcap service httpd stop yum remove httpd yum -y --disablerepo=base,extras,updates --enablerepo=ius install httpd yum -y install openldap-devel expat-devel yum --disablerepo=base,extras,updates --enablerepo=ius -y install httpd-devel mod_ssl yum --disablerepo=base,extras,updates --enablerepo=ius -y update ## PHP rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum install -y --enablerepo=remi,remi-php72 php php-devel php-mbstring php-pdo php-gd php-cli php-mysql php-fpm php-mbstring php-odbc php-pear php-snmp php-bcmath php-xmlrpc php-tidy php-xml php-soap php-pgsql php-mcrypt
パッケージ
yum list installed | grep php php.x86_64 7.2.8-1.el7.remi @remi-php72 php-bcmath.x86_64 7.2.8-1.el7.remi @remi-php72 php-cli.x86_64 7.2.8-1.el7.remi @remi-php72 php-common.x86_64 7.2.8-1.el7.remi @remi-php72 php-devel.x86_64 7.2.8-1.el7.remi @remi-php72 php-fedora-autoloader.noarch 1.0.0-1.el7.remi @remi php-fpm.x86_64 7.2.8-1.el7.remi @remi-php72 php-gd.x86_64 7.2.8-1.el7.remi @remi-php72 php-json.x86_64 7.2.8-1.el7.remi @remi-php72 php-mbstring.x86_64 7.2.8-1.el7.remi @remi-php72 php-mysqlnd.x86_64 7.2.8-1.el7.remi @remi-php72 php-odbc.x86_64 7.2.8-1.el7.remi @remi-php72 php-pdo.x86_64 7.2.8-1.el7.remi @remi-php72 php-pear.noarch 1:1.10.5-6.el7.remi @remi php-pecl-mcrypt.x86_64 1.0.1-6.el7.remi.7.2 @remi-php72 php-pgsql.x86_64 7.2.8-1.el7.remi @remi-php72 php-process.x86_64 7.2.8-1.el7.remi @remi-php72 php-snmp.x86_64 7.2.8-1.el7.remi @remi-php72 php-soap.x86_64 7.2.8-1.el7.remi @remi-php72 php-tidy.x86_64 7.2.8-1.el7.remi @remi-php72 php-xml.x86_64 7.2.8-1.el7.remi @remi-php72 php-xmlrpc.x86_64 7.2.8-1.el7.remi @remi-php72
発生しているエラーメッセージ
composer global require "laravel/installer" 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].
php-zipをインストールすれば解決するとのことなので、下記
sudo yum -y install php-zip Resolving Dependencies --> Running transaction check ---> Package php72u-common.x86_64 0:7.2.8-1.ius.centos7 will be installed --> Processing Conflict: php72u-common-7.2.8-1.ius.centos7.x86_64 conflicts php-common < 7.2.8-1.ius.centos7 Removing php72u-common.x86_64 0:7.2.8-1.ius.centos7 - u due to obsoletes from installed php-common-7.2.8-1.el7.remi.x86_64 ius/x86_64/filelists_db | 700 kB 00:00:00 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package php72u-common.x86_64 0:7.2.8-1.ius.centos7 will be installed --> Finished Dependency Resolution Error: php72u-common conflicts with php-common-7.2.8-1.el7.remi.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
下記方法も手動で試してみる
sudo yum install --enablerepo=remi-php72 php-zip Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.cat.net * epel: mirror.dmmlabs.jp * extras: mirrors.cat.net * ius: mirrors.kernel.org * remi-php72: ftp.riken.jp * remi-safe: ftp.riken.jp * updates: mirrors.cat.net Package php72u-common-7.2.8-1.ius.centos7.x86_64 is obsoleted by php-common-7.2.8-1.el7.remi.x86_64 which is already installed Nothing to do
ということで、conflictが起きているみたいです。
php-zipインストール優先で下記実行してみましたが、結局うまくいきませんでした。
# ↓ phpコマンド不可になる sudo yum remove php-common # ↓ 依存パッケージのみインストールされる sudo yum install --enablerepo=remi-php72 php-zip
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。