“use of opcode 153; this emulator supports only up

2019-03-02 11:11发布

问题:

I'm new to erlang and cowboy.

I'm trying the very simple example from https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/ but I get stuck already. After doing the 'make run' I get

mess@server [erlang_test]# /usr/local/bin/make run
 DEPEND erlang_test.d
 ERLC   erlang_test_app.erl erlang_test_sup.erl
 APP    erlang_test
 GEN    /home/mess/erlang_test/.erlang.mk/relx

=ERROR REPORT==== 26-Oct-2016::01:03:06 ===
Loading of /home/mess/erlang_test/.erlang.mk/relx/relx/ebin/relx.beam failed: badfile
escript: exception error: undefined function relx:main/1
  in function  escript:run/2
  in call from escript:start/1
  in call from init:start_it/1
  in call from init:start_em/1

=ERROR REPORT==== 26-Oct-2016::01:03:06 ===
beam/beam_load.c(1365): Error loading module relx:
  use of opcode 153; this emulator supports only up to 152

make: *** [erlang.mk:6350: relx-rel] Error 127

any idea what is going on? I only see a file .erlang.mk/relx but no directory with a relax.beam deeper down.

Thanks!

回答1:

The error use of opcode 153; this emulator supports only up to 152 means that you have a relx.beam file that was compiled with Erlang/OTP R15 or later, but you're trying to run it in R14 or earlier. Upgrade to a newer Erlang version, or if you already have a newer version, figure out where the old Erlang is hiding and remove it.



标签: erlang cowboy