简体   繁体   English

Tomcat 8.0不会在mac上运行

[英]Tomcat 8.0 wont run on mac

I have a fresh installation of tomcat 8.0 When i run the startup.sh script i get: 我有一个全新的tomcat 8.0安装当我运行startup.sh脚本时,我得到:

    dirname: illegal option -- b
usage: dirname path
catalina.sh
Cannot find /catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program

So i echo the EXECUTABLE variable located in the startup.sh script and i get the filename correctly 'see the catalina.sh log above, which is not part of the standard log'. 所以我回应位于startup.sh脚本中的EXECUTABLE变量,我正确地获取文件名'请参阅上面的catalina.sh日志,这不是标准日志的一部分'。 since the file exists, i believe the only problems are permissions, and indeed i see that i do not have exec x rights: 由于该文件存在,我相信唯一的问题是权限,实际上我看到我没有exec x权限:

    ls -l startup.sh
-rw-r--r--@ 1 USERNAME  admin  1931 Apr 26 14:32 startup.sh

So i modify them: 所以我修改它们:

    chmod a+x *
    ls -l startup.sh
-rwxr-xr-x@ 1 USENAME  admin  1931 Apr 26 14:32 startup.sh

Now that i have the permissions, i execute the file. 现在我有权限,我执行文件。 But i get the same error again. 但我再次得到同样的错误。 The strange thing is that if i run tomcat from within a server instance in Eclipse, it works fine. 奇怪的是,如果我从Eclipse中的服务器实例中运行tomcat,它可以正常工作。 But as far as i know Eclipse run the exact same startup.sh script. 但据我所知Eclipse运行完全相同的startup.sh脚本。 any tips? 有小费吗? thx 谢谢

All shell files in bin should have execution excess. bin中的所有shell文件都应该执行多余。 Try doing this: 试着这样做:

chmod +x bin/catalina.sh

you might get this message 你可能会收到这条消息

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

try doing chmod +x .sh or chmod +x bin/ .sh 尝试做chmod + x .sh或chmod + x bin / .sh

It worked for me 它对我有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM