无法包含"vendor/autoload.php"在Ubuntu上安装Composer之后 [英] Unable to include "vendor/autoload.php" after installing Composer on Ubuntu

查看:154
本文介绍了无法包含"vendor/autoload.php"在Ubuntu上安装Composer之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚熟悉Linux服务器,并且试图在我的Ubuntu服务器上安装Composer.我认为所有东西都安装正确,除了当我尝试包括Composer的自动加载器时,我得到一个PHP错误:

I'm just getting familiar with Linux servers and I'm trying to install Composer on my Ubuntu server. I think everything installed correctly except when I try to include Composer's autoloader I get a PHP error:

Warning: require(/usr/share/php/opencloud/lib/../vendor/autoload.php): failed to open stream: No such file or directory in /usr/share/php/opencloud/lib/php-opencloud.php on line 5 Fatal error: require(): Failed opening required '/usr/share/php/opencloud/lib/../vendor/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/opencloud/lib/php-opencloud.php on line 5

我的composer.json是:

My composer.json is:

{
    "require": {
        "rackspace/php-opencloud": "v1.7.0"
    }
}

当我运行"composer diag"时,它输出以下内容:

And when I run "composer diag" it outputs this:

Checking composer.json: FAIL
name : is missing and it is required
description : is missing and it is required

推荐答案

这是WINDOWS上Composer的现有错误(至少对我而言).手动安装样式Composer.

This is an existing bug with Composer on WINDOWS (for me, at least). Manual install style Composer.

vendor/autoload.php既未创建,也未创建任何其他与自动加载有关的内容.

vendor/autoload.php is not created nor is any other autoload-related content.

我在Linux和Windows上尝试了完全相同的操作(批处理命令中特定于平台的不同选项除外),以运行Composer并使用composer install&安装/设置机架空间.composer-rackspace需要批生产线.我得到2个不同的结果.在Linux上创建与自动加载相关的东西就好了.没有为Windows创建与自动加载相关的内容.

I try the same exact thing on Linux AND Windows (except for the platform-specific different options in the batch commands) for running Composer and installing/setting up rackspace using composer install & composer-rackspace require batch line. I get 2 different results. Autoload-related stuff is created on linux just fine. No autoload related stuff is created for Windows.

猜猜Windows Composer需要更多的工作/修复.:(

Guess Windows Composer needs more work/fixing. :(

到目前为止,对于我来说,这总体上似乎可以在Linux/Ubuntu上运行,如果出现任何问题,我会通知您.

This in general seems to be working on Linux/Ubuntu for me so far, I'll let you know if I get any problems.

这篇关于无法包含"vendor/autoload.php"在Ubuntu上安装Composer之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆