bash 激活器:找不到命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30616874/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 13:07:03  来源:igfitidea点击:

Activator: command not found

javabashscalaplayframeworktypesafe-activator

提问by Govind Singh

I am trying to install activator in my linux system.

我正在尝试在我的 linux 系统中安装激活器。

so first I install java

所以首先我安装java

 sudo add-apt-repository ppa:webupd8team/java
 sudo apt-get update
 sudo apt-get install oracle-java8-installer

downloaded succefully

下载成功

then I downloaded activator

然后我下载了激活器

sudo wget downloads.typesafe.com/typesafe-activator/1.3.4/ypesafe-activator-1.3.4.zip

then added path

然后添加路径

export PATH=$PATH:/home/govind/activator-1.3.4/

then reloaded bash by

然后重新加载bash

source ~/.bashrc

then I try to start activator

然后我尝试启动激活器

govind@LINUXSERVER:~$ sudo activator
sudo: activator: command not found

I tried to print path

我试图打印路径

govind@LINUXSERVER:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/govind/activator-1.3.4/: No such file or directory

but

govind@LINUXSERVER:~$ ls /home/govind/activator-1.3.4/
activator      activator-launch-1.3.4.jar  README.html  templates
activator.bat  LICENSE.html                repository

but not successfull!! what am I missing??

但没有成功!!我错过了什么?

回答by Mon Calamari

Create a symbolic link to activator:

创建激活器的符号链接:

sudo ln -s /home/govind/activator-1.3.4/activator /usr/bin/activator

You do not need to edit bashrc profile.

您不需要编辑 bashrc 配置文件。

回答by prit4fun

I think the documentation should be fixed.The path still works in earlier versions of activator, but the recent versions don't have executable activator in the mentioned directory. Instead, you can find this inside bin folder.

我认为文档应该是固定的。该路径在早期版本的激活器中仍然有效,但最近版本在提到的目录中没有可执行激活器。相反,您可以在 bin 文件夹中找到它。

So for earlier versions of activator

所以对于早期版本的激活器

export PATH=/home/<user>/activator-dist-1.3.2:$PATH

should do, and for recent versions,

应该做,对于最近的版本,

export PATH=/home/<user>/activator-dist-x.x.x/bin:$PATH

/bin is not mentioned in the play documentation

播放文档中没有提到 /bin

回答by elm

Superuser may not have activatorset in $PATH. If sudo is indeed required, try

超级用户可能没有activator设置$PATH. 如果确实需要 sudo,请尝试

sudo /home/govind/activator-1.3.2/activator

or sudo copy activatorto for instance /usr/bin. Else the procedure depicted proves valid.

或 sudo 复制activator到例如/usr/bin。否则所描述的过程证明是有效的。

回答by Varun Bhaskar

Try this

尝试这个

  • cd to activityDirectory/bin.
  • type ./activator sh command and you will be shown the list of commands you can try
  • To create a new project type ./activator [new_Project_name] [Template Name, eg:lagom-java]
  • cd 到活动目录/bin。
  • 输入 ./activator sh 命令,您将看到可以尝试的命令列表
  • 创建一个新的项目类型 ./activator [new_Project_name] [Template Name, eg:lagom-java]

回答by soundcorner

Try this:

尝试这个:

add activator bin path to your .bashrc

将激活器 bin 路径添加到您的 .bashrc

you can find the path by

你可以找到路径

locate .bashrc

找到 .bashrc

Now if you changed to the home directory where it should usually be, edit this file.

现在,如果您更改到通常应位于的主目录,请编辑此文件。

gedit .bashrc

编辑 .bashrc

add this line: export PATH="$HOME/Dev/activator-1.3.XX-minimal/bin:$PATH" replace X by the correct version number and save this file

添加这一行: export PATH="$HOME/Dev/activator-1.3.XX-minimal/bin:$PATH" 用正确的版本号替换 X 并保存此文件

source .bashrc

源.bashrc

If opened a terminal window, close it and restart again.

如果打开了终端窗口,请将其关闭并重新启动。

activator

活化剂

running activator window

运行激活窗口

回答by Ravindra

Try This:-

尝试这个:-

In Centos:- The activator path is not found that's why you are getting this message. I have used the full path with command and its working fine.

在 Centos 中:- 未找到激活器路径,这就是您收到此消息的原因。我已经使用了命令的完整路径并且它工作正常。

activator/full/path/activator run

激活器/完整/路径/激活器运行

回答by zdavatz

this is the correct download link:

这是正确的下载链接:

wget downloads.typesafe.com/typesafe-activator/1.3.10/typesafe-activator-1.3.10.zip

the above link had a typo.

上面的链接有一个错字。