Activator: command not found

2019-06-17 08:07发布

I am trying to install activator in my linux system.

so first I install 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

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??

7条回答
forever°为你锁心
2楼-- · 2019-06-17 08:21

Try this:

add activator bin path to your .bashrc

you can find the path by

locate .bashrc

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

gedit .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

source .bashrc

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

activator

running activator window

查看更多
放我归山
3楼-- · 2019-06-17 08:27

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

sudo /home/govind/activator-1.3.2/activator

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

查看更多
Melony?
4楼-- · 2019-06-17 08:27

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.

查看更多
爷、活的狠高调
5楼-- · 2019-06-17 08:32

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]
查看更多
一纸荒年 Trace。
6楼-- · 2019-06-17 08:44

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.

查看更多
孤傲高冷的网名
7楼-- · 2019-06-17 08:44

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.

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

查看更多
登录 后发表回答