'Cannot read ENT_SEARCH_CONFIG_PATH file' error in Enterprise Search

I'm trying to log in Elastic Enterpirse Search:
ENT_SEARCH_DEFAULT_PASSWORD=somepassword bin/enterprise-search

but get this Error:

Found java executable in PATH
Java version detected: 11.0.10 (major version: 11)
Cannot read ENT_SEARCH_CONFIG_PATH file, it's currently /usr/share/enterprise-search/config/enterprise-search.yml

I running it on Ubuntu 20.04 following instructions from here: Download Elastic Enterprise Search | Elastic

I installed Elasticsearch following instructions from here: How To Install Elasticsearch, Logstash, and Kibana (Elastic Stack) on Ubuntu 20.04 | DigitalOcean (installed only elasticsearch, neither kibana nor logstash)

Could you help me?

@basan4ik

Per the error message, it's having trouble finding your config file at /usr/share/enterprise-search/config/enterprise-search.yml. Does that file exist? If not, where is that file located? It should be in the config directory of your enterprise search install.

Yes, this file /usr/share/enterprise-search/config/enterprise-search.yml exists.

By the way, I installed Elasticsearch on a remote server with apt-get on Ubuntu 20.04. And those instructions were kind of perplexed, may be I should have install it just by downloading tar.gz archive? Is this way of installation better or worse? (I know that installing it via zip (both ElasticeSearch and Enterprise Search) is much simpler, I previously installed them this way on my Mac)

Just went through some similar with another user check the permissions carefully.

If you installed via package manager the permissions maybe different that the user you are using when you are trying to start manually.

As noted you could try with tar.gz less complexity.

Yep, I think I'll try to reinstall it with tar.gz archive, even though some people think that this approach is just for "to play around with...".

Installing from zip or tar.gz archive is best if you just want to play around with Elasticsearch for a bit. Installing from either of these options simply makes available the binaries needed for running Elasticsearch. Installing from the deb package fully installs Elasticsearch and starts the server running immediately. This includes installing an init script at /etc/init.d/elasticsearch which starts Elasticsearch on boot. If you are only looking to play around with Elasticsearch, I suggest installing from the zip or tar.gz. That way, you can discover Elasticsearch while starting and stopping the server at will.

It's from this old article: How To Install Elasticsearch on an Ubuntu VPS | DigitalOcean