ODBC port_program_executable_not_found

Michael McDaniel erlang@REDACTED
Thu Nov 3 17:36:32 CET 2005


On Wed, Nov 02, 2005 at 03:07:21PM -0600, Jeff Einhorn wrote:
> I followed the instructions for setting up ODBC mysql for erlang on trapexit
> (http://www.trapexit.org/docs/howto/odbc-howto.html ) and I ran into the
> following error?
> 
> =ERROR REPORT==== 2-Nov-2005::14:55:02 ===
> 
> Error in process <0.40.0> with exit value: {{badmatch,
> {error,port_program_executable_not_found}},[{erl_eval,expr,3}]}
> 
> Any suggestions on where to start looking for the problem?  I did verify that
> the odbc driver works with the odbctest program.
> 
> Thanks,
> 
> Jeff
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Later releases of Erlang (e.g. R10B-8) should "just work" and
not need changes to the make or config files.

Presumably you received no errors in building erlang such as
*** odbc application not built ***.  


I think the "port_program_exectutable" should be located at
priv/bin/odbcserver under the erlang/lib/odbc-2.x directory
(though I am not certain that is the program referenced by
this error message).  Anyway...



If no errors about odbc during build, then for troubleshooting
the immediate problem I suggest using strace thusly ...

$ strace erl > foo.log 2>&1
application:start(odbc).
q().
$ echo "        now look at foo.log to investigate odbc problem"
        now look at foo.log to investigate odbc problem
$

For my R10B-8 install, it looks into 
/usr/local/lib/erlang/lib/odbc-2.0.4/

Directory structure of this directory (and ebin and priv/bin)
looks like
$
$ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/
total 36
4 drwxrwxr-x   8  421 staff 4096 2005-10-25 02:19 .
4 drwxrwxr-x  46  421 staff 4096 2005-10-25 02:37 ..
4 drwxr-xr-x   2 root root  4096 2005-10-26 13:34 c_src
4 drwxrwxr-x   3  421 staff 4096 2005-10-25 02:19 doc
4 drwxr-xr-x   2 root root  4096 2005-10-26 13:34 ebin
4 drwxr-xr-x   2 root root  4096 2005-10-26 13:34 include
4 -rw-r--r--   1  421 staff  111 2005-10-25 02:19 info
4 drwxr-xr-x   4 root root  4096 2005-10-26 13:34 priv
4 drwxr-xr-x   2 root root  4096 2005-10-26 13:34 src
$
$ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/ebin
total 52
 4 drwxr-xr-x  2 root root   4096 2005-10-26 13:34 .
 4 drwxrwxr-x  8  421 staff  4096 2005-10-25 02:19 ..
 4 -rw-r--r--  1 root root    271 2005-10-26 13:34 odbc.app
 4 -rw-r--r--  1 root root   1188 2005-10-26 13:34 odbc_app.beam
 4 -rw-r--r--  1 root root     17 2005-10-26 13:34 odbc.appup
28 -rw-r--r--  1 root root  26348 2005-10-26 13:34 odbc.beam
 4 -rw-r--r--  1 root root   1460 2005-10-26 13:34 odbc_sup.beam
$
$ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin
total 124
  4 drwxr-xr-x  2 root root   4096 2005-10-26 13:34 .
  4 drwxr-xr-x  4 root root   4096 2005-10-26 13:34 ..
116 -rwxr-xr-x  1 root root 114494 2005-10-26 13:34 odbcserver


Also, I put the following two lines in my application to
guarantee my environment variables

  os:putenv("ODBCINI", "/etc/unixODBC/odbc.ini") ,
  os:putenv("ODBCSYSINI", "/etc/unixODBC/odbcinst.ini") ,


Hope the above helps, please let us know what you find and your
platform and version numbers.

~Michael



More information about the erlang-questions mailing list