xcode 找不到 Fastlane 命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36369197/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fastlane command not found
提问by Viswanth Chadalawada
I am trying to install fastlane
. I have Xcode installed. I installed fastlane
using the command sudo gem install fastlane
. I now go into my project folder and type fastlane init
and get the error:
我正在尝试安装fastlane
. 我已经安装了 Xcode。我fastlane
使用命令安装sudo gem install fastlane
。我现在进入我的项目文件夹并键入fastlane init
并收到错误:
-bash: fastlane: command not found.
-bash: fastlane: 命令未找到。
I see that fastlane
is installed and can see it here
我看到它fastlane
已安装,可以在这里看到
/Users/username/.gem/ruby/2.0.0/gems/fastlane-1.70.0/bin
/Users/username/.gem/ruby/2.0.0/gems/fastlane-1.70.0/bin
on my Mac.
在我的 Mac 上。
I tried adding this to my PATH
, but I still get the same error. My path is
我尝试将此添加到我的PATH
,但我仍然遇到相同的错误。我的路径是
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:./Users/username/.gem/ruby/2.0.0/gems/
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:./Users/username/.gem/ruby/2.0.0/gems/
What am I missing here?
我在这里缺少什么?
回答by baichao zeng
Add the following line to your bash profile:
将以下行添加到您的 bash 配置文件中:
export PATH="$HOME/.fastlane/bin:$PATH"
You can either close the terminal session and restart it or run source ~/.bash_profile
to load your configuration and then you can go so you start using fastlane
您可以关闭终端会话并重新启动它或运行source ~/.bash_profile
以加载您的配置,然后您就可以开始使用 fastlane
回答by atitpatel
I got run into similar issue last week. I installed fastlane using homebrew on mac, but it was showing the same error.
我上周遇到了类似的问题。我在 mac 上使用自制软件安装了 fastlane,但它显示了同样的错误。
I tried installing it using Ruby and it worked like a charm. Here is the command.
我尝试使用 Ruby 安装它,它的效果非常好。这是命令。
sudo gem install fastlane -NV
Also seems like you have not installed command line tools for xcode.
似乎您还没有为 xcode 安装命令行工具。
Install them using xcode-select --install
使用安装它们 xcode-select --install
回答by mistdon
I met this issue because of installing zsh, the below two steps solve my problem:
由于安装zsh,我遇到了这个问题,以下两个步骤解决了我的问题:
open ~/.zshrc
save path
2.1 if you install fastlane with Homebrew
Copy
export PATH="$HOME/.fastlane/bin:$PATH"
on the bottom line.2.2 if you install fastlane with RubyGems
Copy
export PATH="/usr/local/bin/fastlane""
on the bottom line.save upon file and try
fastlane init
, everything is OK!
open ~/.zshrc
保存路径
2.1 如果你用 Homebrew 安装 fastlane
复制
export PATH="$HOME/.fastlane/bin:$PATH"
的底线。2.2 如果你用 RubyGems 安装 fastlane
复制
export PATH="/usr/local/bin/fastlane""
的底线。保存文件并尝试
fastlane init
,一切正常!
回答by Sunkas
- In the terminal type
cd ~/
to go to your home folder - Type
touch .bash_profile
to create your new empty file - Type
open -e .bash_profile
to open the file - Enter
export PATH="$HOME/.fastlane/bin:$PATH"
and save - Restart terminal (not sure needed?)
- 在终端类型
cd ~/
中转到您的主文件夹 - 键入
touch .bash_profile
以创建新的空文件 - 键入
open -e .bash_profile
以打开文件 - 输入
export PATH="$HOME/.fastlane/bin:$PATH"
并保存 - 重启终端(不确定是否需要?)
回答by sudo bangbang
fastlane is in cask now. You can install it using
fastlane 现在在桶中。您可以使用安装它
brew cask install fastlane
Now you need to export PATH so that your shell can find fastlane do
现在您需要导出 PATH 以便您的 shell 可以找到 fastlane do
export PATH="$HOME/.fastlane/bin:$PATH"
If that doesn't work, try this
如果这不起作用,试试这个
export PATH="$HOME/.fastlane/bin/fastlane_lib:$PATH"
Make sure you add it to ~/.profile, ~/.zshrc or ~/.bashrc for future
确保将其添加到 ~/.profile、~/.zshrc 或 ~/.bashrc 以备将来使用
回答by Mohamed Saleh
I have got the same issue on mac 10.11
, after a lot of struggling I found that the problem in installing unf_ext 0.0.7.2
gem
I have done the following from this answer
我在 mac 上遇到了同样的问题10.11
,经过很多努力,我发现安装unf_ext 0.0.7.2
gem的问题我已经从这个答案中完成了以下操作
brew install coreutils
After that try reinstall fastlane
again it should work again
之后fastlane
再次尝试重新安装它应该可以再次工作
回答by Alok SInha
If you are working on local machine then add following to you .bash_profile
如果您在本地机器上工作,则将以下内容添加到您的 .bash_profile
export PATH="$HOME/.fastlane/bin:$PATH"
出口 PATH="$HOME/.fastlane/bin:$PATH"
If you are working on Jenkins then this worked for me
如果你在 Jenkins 上工作,那么这对我有用
Under Jenkins-> Manage Jenkins-> Configure System-> Global properties-> Environment variables I added:
在Jenkins-> Manage Jenkins-> Configure System-> Global properties-> Environment variables 我添加:
Name: PathValue: /bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
名称:路径值:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
回答by Thanh Vu
You can add fastlane path environment by add line
您可以通过添加行来添加 fastlane 路径环境
export PATH="$HOME/.fastlane/bin:$PATH"
to ~/.bash_profile
or ~/.zsh_profile
file (if you use zsh shell).
to~/.bash_profile
或~/.zsh_profile
file(如果您使用 zsh shell)。
And final start new terminal session or reload using command source ~/.bash_profile
or source ~/.zsh_profile
(if you use zsh shell)
最后启动新的终端会话或使用命令重新加载source ~/.bash_profile
或source ~/.zsh_profile
(如果您使用 zsh shell)
回答by littlebear333
First,You need to check if you have the ~/.fastlane file. If you don't have the file, you can execute brew cask install fastlanecommand. If you already have it. Check other answers.
首先,您需要检查您是否有 ~/.fastlane 文件。如果没有该文件,可以执行brew cask install fastlane命令。如果你已经拥有了。检查其他答案。
回答by EL TEGANI MOHAMED HAMMAD GABIR
I faced this issue in Fedora 30
i followed these steps:-
我在Fedora 30
遵循以下步骤时遇到了这个问题:-
1-installed all dev tools using these commands
1-使用这些命令安装所有开发工具
sudo dnf install @development-tools
sudo dnf install @rpm-development-tools
2- run sudo gem install fastlane -NV
2-运行 sudo gem install fastlane -NV
Fastlane
worked like a charm
hope it helped
Fastlane
像魅力一样工作,希望它有所帮助