/usr/lib/erlang/lib/parsetools-2.2/include/yeccpre.hrl: no such file or directory

There is an issue while configuring PostgreSQL in phoenix,
I have created the database mentioned in config/dev.exs,
I am able to connect to this PostgreSQL through python code as well. But while initializing connection through phx, it erroring out :frowning:

phoenix_elixir/oops/rumbl$ mix ecto.create
==> gettext
Compiling 1 file (.yrl)
/usr/lib/erlang/lib/parsetools-2.2/include/yeccpre.hrl: no such file or directory
could not compile dependency :gettext, “mix compile” failed. You can recompile this dependency with “mix deps.compile gettext”, update it with “mix deps.update gettext” or clean it with “mix deps.clean gettext”
phoenix_elixir/oops/rumbl$ ls
assets _build config deps lib mix.exs mix.lock priv README.md test

Maybe you generated the app with an older generator? Can you show your Erlang and Elixir versions, and what does mix archive return?

It seems as if your erlang installation misses the parsetools application. Usually its an erlang core library, but some linux distributions split those into separate packages.

You need to install erlang-parsetools or how it is called in your distributions ecosystem.

1 Like

Yep, in those cases using asdf solves most if not all issues really.

Go and install
postgreSQL 13

Yes the last option to install asdf

ubuntu 22.04 LTS:
apt install erlang-dev

5 Likes

this works for me

thanks!!

This works for me too. Thanks

Thanks!