dongxie9448 2018-04-13 10:41
浏览 171
已采纳

Symfony 4安装没有“public”文件夹。只需“vendor /”。(无法打开输入文件:bin / console)

I want to learn Symfony Framework but i can't run it.Composer latest version.And i use this command to install framework as Docs said.Than i use this command for start the server in "project/" folder but i get that error "Could not open input file: bin/console".

duhan@dbalci:/var/www$ composer create-project symfony/skeleton project


Installing symfony/skeleton (v4.0.5)
  - Installing symfony/skeleton (v4.0.5): Loading from cache
Created project in project
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 21 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.0.78): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.7.0): Loading from cache
  - Installing symfony/console (v4.0.8): Loading from cache
  - Installing symfony/routing (v4.0.8): Loading from cache
  - Installing symfony/http-foundation (v4.0.8): Loading from cache
  - Installing symfony/yaml (v4.0.8): Loading from cache
  - Installing symfony/framework-bundle (v4.0.8): Loading from cache
  - Installing symfony/http-kernel (v4.0.8): Loading from cache
  - Installing symfony/event-dispatcher (v4.0.8): Loading from cache
  - Installing psr/log (1.0.2): Loading from cache
  - Installing symfony/debug (v4.0.8): Loading from cache
  - Installing symfony/finder (v4.0.8): Loading from cache
  - Installing symfony/filesystem (v4.0.8): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/dependency-injection (v4.0.8): Loading from cache
  - Installing symfony/config (v4.0.8): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Installing symfony/cache (v4.0.8): Loading from cache
  - Installing symfony/dotenv (v4.0.8): Loading from cache
Writing lock file
Generating autoload files

duhan@dbalci:/var/www$ cd project/
duhan@dbalci:/var/www/project$ php bin/console server:run
Could not open input file: bin/console

There is just "vendor/" folder but i seen in tutorials there is more.
"ls -l" output :

duhan@dbalci:/var/www/project$ ls -l
total 60
-rw-rw-r-- 1 duhan duhan  1231 Apr 13 13:30 composer.json
-rw-rw-r-- 1 duhan duhan 48230 Apr 13 13:30 composer.lock
-rw-rw-r-- 1 duhan duhan     3 Apr 13 13:30 symfony.lock
drwxrwxr-x 5 duhan duhan  4096 Apr 13 13:30 vendor
  • 写回答

1条回答 默认 最新

  • duanmin0941 2018-04-13 11:48
    关注

    It seems like Composer hasn't fully executed the functionality in the symfony/flex plugin. The only reason I can think of that would cause this is if you've got plugins disabled globally (you can diagnose this by running composer config -l and seeing if it mentions no-plugins anywhere)

    I can replicate your directory structure by running:

    composer create-project symfony/skeleton project --no-plugins
    cd project
    composer install
    

    This will create an empty symfony.lock file, but not unpack any of the installed Symfony recipes.

    From here, you should be able to complete the installation by running

    composer fix-recipes
    

    in the project folder. This will finish unpacking all of the installed recipes, including creating the missing directory structure.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么