linux nginx-clojure module integrated sudo ./configure error: javac not found (permission problem)

    

       In addition to enriching nginx with lua , an efficient scripting language , I recently tried to use a new module---->> 

nginx-clojure  https://github.com/nginx-clojure/nginx-clojure/

 

        When it comes to the nginx-clojure module, it can obtain and modify request data, response data, header information, etc. (basically, the data that can be obtained and modified in java servlet can also be obtained and modified), so based on him, we can complete Many servlets can complete the data, and even he can connect to mysql, redis, etc.

Of course, nginx-clojure is written in a language I am familiar with: Java;

 

The problem is when configuring to install the nginx module:

sudo ./configure,show ERROR:"javac not found, please put it in your PATH" by check jdk

 

I have tried all kinds of things, /etc/profile and the user root directory are all configured, echo $PATH also shows no problem, even if I directly run nginx-clojure-0.4.4/src/c/config file is no problem The jdk is detected; at this time, I think it should be a permission problem, but the sudo operation permission should be able to achieve it, and then directly switch the root user, configure passed.

 

However, after all, I think this is not the best solution, and then I asked the contributor xfeep on github ( https://github.com/nginx-clojure/nginx-clojure/issues/128#issuecomment-230770242 ), he Hold me a chestnut, 

$ echo "echo \$PATH" > p.sh
$ sh p.sh
/home/who/bin:/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ sudo sh p.sh
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

This is different from the running result of the direct input command. Then I just run the following directly:

### configure arguments are omitted here
./configure
make
sudo make install

 Then, if you are prompted that jre/jdk cannot be found when configuring the location, you can directly specify jvm_path="your jdk path" in nginx.conf  instead of using auto.

 

 Reprint the original text

Link:  http://zl378837964.iteye.com/blog/2309916

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326613555&siteId=291194637