๐ท๐ผ๋ชจ์ฌ๋ด์ ๊ฐ๋ฐ์์ฒ๐ท๐ผ
[Linux] ERROR: JAVA_HOME is set to an invalid directory ํด๊ฒฐ๋ฒ ๋ณธ๋ฌธ
๊ฐ๋ฐ/๊ฐ๋ฐ๊ด๋ จ ๊ธฐํ ๊ธ
[Linux] ERROR: JAVA_HOME is set to an invalid directory ํด๊ฒฐ๋ฒ
์์ผ์ด 2023. 2. 15. 09:17๋ฐ์ํ
gradle์ ์ค์นํ๊ณ ์ค์น ํ์ธ์ ์ํด gradle -v ๋ช ๋ น์ด๋ฅผ ์ณค๋๋ฐ
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b08-1.el7_9.x86_64/jre/bin/java
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
์ด๋ฐ ์๋ฌ๊ฐ ๋ฐ์ํ๋๊ฒ์ด๋ค.
ํด๊ฒฐ๋ฐฉ๋ฒ์
readlink -f $(which java)
ํ์ฌ java๊ฐ ์ค์น๋ ๊ฒฝ๋ก๋ฅผ ์์๋ธ ๋ค์ ๋ง์ง๋ง /bin ~ ๋ถํฐ ์ญ์ ํ์ฌ
์๋ฅผ๋ค๋ฉด
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b08-1.el7_9.x86_64/jre/bin/java (๊ฒฝ๋ก)
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b08-1.el7_9.x86_64/jre (์ญ์ ํ ๊ฒฝ๋ก)
vi /etc/profile
์์ JAVA_HOME ๊ฒฝ๋ก๋ฅผ ๋ฐ๊พธ๋ฉด ๋๋ค
'๊ฐ๋ฐ > ๊ฐ๋ฐ๊ด๋ จ ๊ธฐํ ๊ธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Comments