宝塔搭建laravel

2023-11-14 19:41:52 浏览数 (4)

1.安装composer

代码语言:javascript复制
https://getcomposer.org/Composer-Setup.exe

2. 拉取laravel 两种方法都行

代码语言:javascript复制
// 不设置laravel 版本号 默认拉取最新的
composer creat-project laravel/laravel
// 设置版本 注意.是当前目录 会生成一个laravel 文件夹
composer creat-project laravel/laravel:^8.0 .

3.错误一 ‘Call to undefinedfunction SymfonyComponentProcessproc_get_status()’

代码语言:javascript复制
Creating a "laravel/laravel" project at "./laravel"

In Process.php line 1345:

  [Error]
  Call to undefined function SymfonyComponentProcessproc_get_status()


Exception trace:
  at phar://C:/Users/Administrator/AppData/Local/ComposerSetup/bin/composer.phar
/vendor/symfony/process/Process.php:1345
 SymfonyComponentProcessProcess->updateStatus() at phar://C:/Users/Administra
tor/AppData/Local/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process
.php:367

解决方法:找到对应方法删掉

3.

代码语言:javascript复制
Creating a "laravel/laravel" project at "./laravel"
Cannot use laravel/laravel's latest version v10.2.8 as it requires php ^8.1 whic
h is not satisfied by your platform.
Installing laravel/laravel (v9.5.2)
  - Installing laravel/laravel (v9.5.2): Extracting archive
Created project in D:wwwrootwww.lottery.comlaravel
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Tue Nov 14 19:13:50 2023 (10704): Fatal Error Base address marks unusable memory
 region. Please setup opcache.file_cache and opcache.file_cache_fallback directi
ves for more convenient Opcache usage
Script @php -r "file_exists('.env') || copy('.env.example', '.env');" handling t
he post-root-package-install event returned with error code -2

手动复制.env.example 改为.env

4.执行composer update

5. No application encryption key has been specified.

代码语言:javascript复制
php artisan key:generate

0 人点赞