


Have you tried mix deps.clean gettext
You are likely missing the Erlang-parsetools package. Some distributions break Erlang into multiple Packages so you need to install them manually. Elixir v1.2 will include a better error message.
Chris, let's change the title to mention gettext and leave this open to help others that will certainly stumble upon this (on my phone, sorry).
@josevalim thx, I miss some Erlang package, better error message is very helpful for beginner, i develop on mac, use brew is so easy, but on linux need more procedure, thank you for your nice job!!!
Thanks for keeping this open. I just got this error and the title helped me! Fixed that installing erlang-parsetools mentioned by @josevalim.
I had the same error as zhang. After I installed erlang-parsetools I'm getting a different error:
/usr/lib/erlang/lib/parsetools-2.1/include/yeccpre.hrl: no such file or directory
I tried to ls the directory but there was no /include directory inside parsetools-2.1 just a single directory called ebin inside /usr/lib/erlang/lib/parsetools-2.1.
I'm using ubuntu 14.04.3, Elixir 1.1.1 and OTP 18.
@erikdsi try sudo apt-get install erlang
https://github.com/elixir-lang/gettext/issues/67
You may need erlang-parsetools-dev or something of sorts in case they don't include headers in the sources.
@zhangsoledad that worked, thanks a bunch.
The installation page at the Phoenix website implies that Erlang comes with Elixir and as I could fire up the erl repl I had no idea.
I had the same issue as @erikdsi . On my mac it did indeed come with Elixir (brew… I think), but in Ubuntu I had no such luck (apt-get). Considering the ubiquity of Ubuntu servers I'd personally mention this - it stumped me for a while!
I had the same error, but it works now. I just had to install erlang-parsetools.
Here's my recipe for installing erlang (on Ubuntu):
$ wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
$ apt-get update
$ apt-get install erlang-base-hipe install erlang-dev install erlang-eunit erlang-parsetools
thx all. just do sudo apt-get install erlang-parsetools resolved this issue for me on my vagrant instance (ubuntu 14.04, Elixir 1.1.1 and OTP 18)
Installing erlang-parsetools and erlang-dev on my Ubuntu 15.10 machine resolved this issue for me.
The instructions here do not work on the latest LTS release:
$ sudo apt-get install erlang-parsetools erlang-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
erlang-dev is already the newest version (1:18.3-dfsg-1ubuntu3).
erlang-parsetools is already the newest version (1:18.3-dfsg-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ mix ecto.migrate
Hex was built against against Elixir 1.0.5 and you are running 1.1.0-dev, please run `mix local.hex` to update to a matching version
== Compilation error on file lib/gettext/backend.ex ==
** (CompileError) lib/gettext/backend.ex:16: undefined function ::/2
(elixir) expanding macro: Kernel.@/1
lib/gettext/backend.ex:16: Gettext.Backend (module)
(elixir) lib/kernel/parallel_compiler.ex:100: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8
==> gettext
could not compile dependency gettext, mix compile failed. You can recompile this dependency with `mix deps.compile gettext` or update it with `mix deps.update gettext`
@burhan For some reason you are using an old development release (1.1.0-dev) of elixir. Try to update to a more recent, stable version.
@ericmj On a fresh install of 16.04, using the repository from erlang-solutions.com, I have the following issues when I try to upgrade:
$ apt-cache policy esl-erlang
esl-erlang:
Installed: (none)
Candidate: 1:18.3
Version table:
1:18.3 999
999 http://binaries.erlang-solutions.com/ubuntu xenial/contrib amd64 Packages
$ apt-cache policy elixir
elixir:
Installed: (none)
Candidate: 1.1.0~0.20150708-1
Version table:
1.1.0~0.20150708-1 500
500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
$ sudo apt-get install esl-erlang
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
esl-erlang : Depends: libwxbase2.8-0 but it is not installable or
libwxbase3.0-0 but it is not installable
Depends: libwxgtk2.8-0 but it is not installable or
libwxgtk3.0-0 but it is not installable
Recommends: erlang-mode but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
@burhan you need install libwxgtk
sudo apt-get install -y libwxgtk3.0-dev
@zhangsoledad Its already installed:
$ sudo apt-get install -y libwxgtk3.0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libwxgtk3.0-dev is already the newest version (3.0.2+dfsg-1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
i haven't try 16.04, seems there is no xenial dist for erlang
https://groups.google.com/forum/#!topic/elixir-lang-talk/zobme8NvlZ4
maybe this can help you @burhan
The strange thing is if you go here https://packages.erlang-solutions.com/erlang/ you'll see a deb for 16.04, but this doesn't install with the same dependency issue.
@he9lin u r right.
apt-file search yeccpre.hrl told me the missing file is in erlang-dev on Debian
Most helpful comment
@erikdsi try
sudo apt-get install erlanghttps://github.com/elixir-lang/gettext/issues/67