Error encountered while installing erlang-solutions on linux-mint 18 Sarah

I am trying to install elixir for the first time as mentioned in here But I am getting this error even after I removed the previous downloaded erlang-solutions package.

 ~ $ wget
--2019-11-16 13:18:53--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6288 (6.1K)
Saving to: ‘erlang-solutions_2.0_all.deb.3’

erlang-solutions_2. 100%[===================>]   6.14K  --.-KB/s    in 0s      

2019-11-16 13:18:54 (660 MB/s) - ‘erlang-solutions_2.0_all.deb.3’ saved [6288/6288]

 ~ $ sudo dpkg -i erlang-solutions_2.0_all.deb
(Reading database ... 211574 files and directories currently installed.)
Preparing to unpack erlang-solutions_2.0_all.deb ...
Unpacking erlang-solutions (2.0) over (2.0) ...
Setting up erlang-solutions (2.0) ...
Can not detect version codename.
dpkg: error processing package erlang-solutions (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:


  • I had the same problem with my Debian 9.11 section. The problem is in /var/lib/dpkg/info/erlang-solutions.postinst you can change set -e to set -x to debug and see why it returns a 1, but I have downloaded the latest version of and it worked correctly for me