Subscribed unsubscribe Subscribe Subscribe

Cannot find /usr/local/opt/tomcat@7/bin/bin/setclasspath.sh

環境

不具合事象

TomcatをHomebrewでインストール後、起動しようとしたがエラーとなり起動できなかった。

$ brew install tomcat7

$ catalina start
zsh: command not found: catalina

$ /usr/local/opt/tomcat@7/bin/catalina start
Cannot find /usr/local/opt/tomcat@7/bin/bin/setclasspath.sh
This file is needed to run this program

CATALINA_HOME をunsetして再度インストール。

$ brew uninstall tomcat7
Warning: Use zlib instead of deprecated homebrew/dupes/zlib
Uninstalling /usr/local/Cellar/tomcat@7/7.0.77... (628 files, 13.1MB)

$ unset CATALINA_HOME

$ brew install tomcat7

$ /usr/local/Cellar/tomcat@7/7.0.77/bin/catalina start
Using CATALINA_BASE:   /usr/local/Cellar/tomcat@7/7.0.77/libexec
Using CATALINA_HOME:   /usr/local/Cellar/tomcat@7/7.0.77/libexec
Using CATALINA_TMPDIR: /usr/local/Cellar/tomcat@7/7.0.77/libexec/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
Using CLASSPATH:       /usr/local/Cellar/tomcat@7/7.0.77/libexec/bin/bootstrap.jar:/usr/local/Cellar/tomcat@7/7.0.77/libexec/bin/tomcat-juli.jar

起動できた。