Adakah yang menginstal laravel 5 di Ubuntu 16.04? Saya baru saja beralih ke Ubuntu 16.04 dan saya mencoba menginstal kerangka laravel 5 menggunakan komposer. Tetapi setiap kali saya mencoba membuat proyek itu memberi saya erros ini
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/laravel v5.2.0 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.15 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.23 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.24 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.27 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.29 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- laravel/laravel v5.2.31 requires 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.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- 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.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/laravel ^5.2 -> satisfiable by laravel/laravel[v5.2.0, v5.2.15, v5.2.23, v5.2.24, v5.2.27, v5.2.29, v5.2.31].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/5.6/cli/php.ini
- /etc/php/5.6/cli/conf.d/10-opcache.ini
- /etc/php/5.6/cli/conf.d/10-pdo.ini
- /etc/php/5.6/cli/conf.d/20-calendar.ini
- /etc/php/5.6/cli/conf.d/20-ctype.ini
- /etc/php/5.6/cli/conf.d/20-exif.ini
- /etc/php/5.6/cli/conf.d/20-fileinfo.ini
- /etc/php/5.6/cli/conf.d/20-ftp.ini
- /etc/php/5.6/cli/conf.d/20-gettext.ini
- /etc/php/5.6/cli/conf.d/20-iconv.ini
- /etc/php/5.6/cli/conf.d/20-json.ini
- /etc/php/5.6/cli/conf.d/20-phar.ini
- /etc/php/5.6/cli/conf.d/20-posix.ini
- /etc/php/5.6/cli/conf.d/20-readline.ini
- /etc/php/5.6/cli/conf.d/20-shmop.ini
- /etc/php/5.6/cli/conf.d/20-sockets.ini
- /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
- /etc/php/5.6/cli/conf.d/20-sysvsem.ini
- /etc/php/5.6/cli/conf.d/20-sysvshm.ini
- /etc/php/5.6/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, deleting ./composer.json.
Saya membaca artikel Di sini salah satu dari mereka mengatakan bahwa Ubuntu 16.04 dilengkapi dengan PHP7 sebagai default tetapi kita masih dapat menggunakan PHP5. Namun saya mencoba keduanya PHP7 & PHP5 dan masih mendapatkan kesalahan yang sama! Ada ide? Terima kasih
Saya telah memutakhirkan php 5.6.11 ke 5.6.21.
Jadi, dalam kasus saya, saya harus menjalankan:
PS: Bagaimana saya memutakhirkan dari 5.6.11 ke 5.6.21 berikut:
Alasan untuk peningkatan: zend_mm_heap rusak selama pembaruan komposer.
sumber
Ini adalah langkah-langkah yang harus saya ambil untuk menginstal Laravel 5 di Ubuntu Server 16.04 setelah upgrade baru
Pertama saya harus menghapus semua PHP, jadi seperti yang dikatakan Mohammad Barhoush:
sudo apt-get -y purge php.*
Kemudian saya menginstal ulang PHP dengan:
sudo apt install php libapache2-mod-php
sudo apt install php-cli
sudo apt install php-mysql
Setelah menginstal ulang PHP ver.7.0 saya menginstal paket-paket terkait tambahan yang direkomendasikan Mohhammad:
sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext php-gd
Dan mengaktifkan mod
sudo phpenmod mcrypt
sudo phpenmod mbstring
Dan akhirnya setelah semua komposer ini masih menjadi sakit mengeluh itu tidak memiliki ekstensi zip untuk
composer update
jadi saya menginstal yang berikut:sudo apt-get install php7.0-zip
Setelah itu berjalan dengan baik tanpa kesalahan!
Ini adalah langkah-langkah yang diperlukan bagi saya untuk membuat laravel 5 berfungsi berasal dari versi Ubuntu Server LTS sebelumnya. Semoga ini bisa membantu! Salam Hormat :)
-Derick
sumber
Ekstensi mbstring PHP sekarang berada dalam paket terpisah, jadi yang perlu Anda lakukan:
sumber
solusi oerdnj berfungsi, setelah menginstal
mbstring
Anda harus mengaktifkannyaphp.ini
sebelum dijalankancomposer install
. Dalam kasus saya, laravel membutuhkan ext-mbstring dan ext-dom:apt-get install php-dom
sumber
Terima kasih atas tanggapan Anda .. Saya akhirnya dapat menyelesaikan masalah ini dengan melakukan:
Hapus php terlebih dahulu:
sudo apt-get -y purge php.*
Instal ulang php dan paket-paket penting terkait ini:
sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext
Aktifkan mod (Terima kasih untuk video lewis4u):
sudo phpenmod mcrypt
sudo phpenmod mbstring
sumber
Di sana Anda perlu melakukan sesuatu secara manual dalam file konfigurasi .. Saya menemukan artikel ini sangat membantu. Pertama, perlu memeriksa pustaka cuaca mbstring.dll sudah diinstal dalam sistem menggunakan fungsi 'phpinfo ()'. Jika diaktifkan, alih-alih menghapus tanda komentar 'extension = php_mbstring.dll', tetap beri komentar di file konfigurasi php.ini atau jika tidak ada instal dengan
sudo apt-get install php-mbstring php7.0-mbstring
Kemudian konfigurasikan hal berikut.
Itu saja .. Saya pikir Anda tahu hal-hal seperti bagaimana menginstal laravel dan semua ..
sumber
Jadi saya punya masalah yang sama dengan orang di atas di mana saya perlu menginstal php-dom jadi saya mencoba untuk menjalankan
apt-get install php-dom
tetapi hanya muncul dengan pesanSebagai im agak baru ke terminal saya menemukan ini agak membingungkan tetapi saya menjalankan Ubuntu 16,04 dengan php7 jadi saya hanya berlari:
apt-get install php7.0-xml
dan itu bekerja untuk saya ... berharap itu membantu seseorang!sumber
Untuk menginstal
Laravel 5.4
padaUbuntu 16.04
seperti dalam dokumentasi LARAVEL dengan cek:php -v
:, versi php Anda harusPHP >= 5.6.4
php -m
untukOpenSSL PHP Extension
danPDO PHP Extension
.Terminal:
sudo apt install php-mbstring
dan periksa lagiphp -m
untukMbstring PHP Extension
danTokenizer PHP Extension
.Terminal:
sudo apt install php-xml
dan periksa lagiphp -m
untukXML PHP Extension
Unduh Komposer dengan 4 langkah ini di terminal:
php -r "salin (' https://getcomposer.org/installer ', 'composer-setup.php');"
php -r "if (hash_file ('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa03551607dc5computertercetak' setupter 'tembus' setuper '; php ');} echo PHP_EOL; "
php composer-setup.php
php -r "batalkan tautan ('composer-setup.php');"
Periksa komposer di terminal:
php composer.phar
Instal Laravel di terminal:
php composer.phar global require "laravel/installer"
Output di terminal akan menampilkan direktori Anda saat ini
/home/yourname/.config/composer
, pergi ke direktori Anda saat ini dan tekanctrl+h
untuk menampilkan file tersembunyi.Buka
.config
folder lalucomposer
folder dengan konten berikut: konten folder komposerBuat
Laravel project
di/var/www/html
dalam terminal:php composer.phar create-project --prefer-dist laravel/laravel /var/www/html/myLaravel
Buka myLaravel Anda di terminal kemudian tempel:
php artisan serve
dan salinhttp://127.0.0.1:8000
di browser Andasumber