Could you give us more information about your ELK stack version and what are you trying to achieve? As @david mentioned on this post, from version 6.3 we are offering the Elasticsearch Open Source version and, although there is an x-pack folder available, x-pack isn't under an Open Source License but they offer a 30-day trial. Please get more information about it using the link below
In case you are using the ELK stack version 6.2 or previous, we have a guide about how to install x-pack which I linked below. Were you using that guide? And in that case, which steps did you perform before facing your issue?