linux下面nacos启动报错的问题

本文详细解析了Nacos启动脚本中出现的错误,包括语法错误和环境配置问题,分享了解决方案及正确的执行方式,强调了使用正确解释器的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

./startup.sh: 81: ./startup.sh: [[: not found
./startup.sh: 91: ./startup.sh: [[: not found
./startup.sh: 93: ./startup.sh: [[: not found
./startup.sh: 99: ./startup.sh: [[: not found
/usr/lib/jvm/java-8-openjdk-amd64/bin/java  -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/swift/Test/nacos/nacos/logs/java_heapdump.hprof -XX:-UseLargePages -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-8-openjdk-amd64/lib/ext:/home/swift/Test/nacos/nacos/plugins/cmdb:/home/swift/Test/nacos/nacos/plugins/mysql -Xloggc:/home/swift/Test/nacos/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dnacos.home=/home/swift/Test/nacos/nacos -Dloader.path=/home/swift/Test/nacos/nacos/plugins/health -jar /home/swift/Test/nacos/nacos/target/nacos-server.jar  --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/home/swift/Test/nacos/nacos/conf/ --logging.config=/home/swift/Test/nacos/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
./startup.sh: 120: ./startup.sh: [[: not found
nacos is starting with cluster
nacos is starting,you can check the /home/swift/Test/nacos/nacos/logs/start.out

 

我被这个坑了一波,一直以sh的方式执行,谁知道用的解释其居然是bash

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值