codecept:找不到命令 [英] codecept: command not found
问题描述
我全新安装了Ubuntu,并在安装了Yii2等之后似乎无法再运行codecept。
I did a fresh installation of Ubuntu and after installing Yii2 etc I can't seem to be able to run codecept anymore.
我正在使用Yii2。我需要composer.json中最新的codecept版本,它工作正常。但是我似乎找不到找到使代码接收再次运行的方法。
I'm using Yii2. I required the latest codecept version in composer.json which is working fine. But I can't seem to find a way to get codeception running again.
我一直在浏览所有指南,但是除了指南之外,他们都没有其他指南。作曲家需要或将其添加到composer.json。我确实注意到,当我想向$ PATH中添加codecept时,我认为root / vendor / bin /中没有codecept文件,我认为$ PATH条目应该指向该文件。
I've been looking through all the guides but none of them have anything other then just to composer require or add it to the composer.json. I do have noticed when I wanted to add codecept to my $PATH that I don't have a codecept file in root/vendor/bin/, where I think the $PATH entry should point to.
我不知道从这里去哪里。我是否想念某个地方的某个步骤?
只是为了总结一下:
I have no idea where to go from here. Did I miss some step somewhere maybe? Just to sum things up:
- 已安装代码接收(yiisoft / yii2-codeception)。
- root / vendor / bin /不包含任何指向代码接收的内容。
- 命令:codecept运行单元返回:codecept:未找到命令
- 命令:(./)vendor/bin/codecept返回: path:没有这样的文件或目录。
- codeception (yiisoft/yii2-codeception) is installed.
- root/vendor/bin/ does not contain anything that points to codeception.
- command: codecept run unit returns: codecept: Command not found
- command: (./)vendor/bin/codecept return: "path": no such file or directory.
推荐答案
codecept:在Ubuntu上找不到命令
,则应遵循以下步骤:
codecept: command not found
on Ubuntu then you should follow these steps:
sudo composer global require "codeception/codeception=2.1.*" "codeception/specify=*" "codeception/verify=*"
,然后运行以下命令:
sudo ln -s ~/.composer/vendor/bin/codecept /usr/local/bin/codecept
因此 codecept build
和 codecept run
可以正常工作。
如果您使用的是Windows,请运行以下命令:
So codecept build
and codecept run
will work.
If you are using Windows then run this command:
composer global require "codeception/codeception=2.1.*" "codeception/specify=*" "codeception/verify=*"
将此行添加到您的路径中:
Add this line into your path:
~\AppData\Roaming\Composer\vendor\bin
这篇关于codecept:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!