报错是这样的
subdirectory exists in data paths [/usr/local/var/lib/elasticsearch/elasticsearch_mac126]. All data under these paths must be moved up one directory to paths [/usr/local/var/lib/elasticsearch]
网上没找到方案。看字面意思我找到对应的目录把elasticsearch_mac126这个文件夹删除之后重新启动就好了。