FreeBSD相当于unixodbc-dev [英] FreeBSD equivalent to unixodbc-dev

查看:206
本文介绍了FreeBSD相当于unixodbc-dev的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在Ubuntu上,如果你添加了unixodbc-dev软件包,那么确保使用Erlang编译odbc,但是,我找不到与FreeBSD等价的软件包。



我尝试安装unixODBC软件包,libodbc ++与libiodbc包。



我也尝试从unixodbc.org下载unixodbc,并安装,无济于事。



所以如果有一个包我可以使用,或者如果有东西我应该从源代码和编译下载,我迄今为止没有找到解决方案。



任何关于什么软件包需要安装的想法或者需要采取哪些步骤来确保使用Erlang编译ODBC?



注意:这是使用FreeBSD 9.1发布和Erlang R16B02

解决方案

Erlang可以使用unixODBC或libiodbc。



当您从端口安装Erlang时,它应该工作。首先,确保您的端口树是最新的,例如与 portsnap



登录或 su 到根。然后转到 / usr / ports / lang / erlang ,然后运行 make config 。您应该看到以下屏幕:

 ┌────────────── ────────erlang-15.b.03.1_1,3─────────────────────────────────────────────────────────────────────────────── 
│┌─────────────────────────────────────────────────────────────────────────────────────────── ───────────────────────────────────────────────────────────────────────────────────────────────────────────── │
││+ [] DTRACE启用DTrace支持(实验)││
││+ [] GCC使用当前GCC││
││+ [] GS启用GS应用程序(弃用) ││
││+ [] HIPE构建本机HiPE编译器││
││+ [] JAVA Java平台支持││
││+ [x] KQUEUE启用内核轮询(kqueue)支持│ │
││+ [] ODBC ODBC后端││
││+ [x]通过OpenSSL支持OPENSSL SSL / TLS│
││+ [x] SCTP启用SCTP支持││
││+ [x] SMP启用SMP支持││
││+ [x] THREADS线程支持││
││+ [] WX启用WX应用程序││
││───────────────────────────────────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────通过unixODBC││
│└─────────────────────────────────────────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────── ─────────── ───────┤
│< OK> <取消> │
└─────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────$ $ p>

选择IOBDC或UNIXODBC选项。然后以root身份运行命令 make install clean 应该建立并安装Erlang及其所有依赖项。



修改:如果您不想使用端口,请确保您有在编译erlang之前安装 databases / unixODBC databases / libiodbc ,然后使用 with-odbc 选项与erlang的配置,它应该工作正常。这就是端口所做的。


I'm trying to compile Erlang on FreeBSD, and I want to include the odbc licenses.

On Ubuntu, if you add the unixodbc-dev package, that ensures that odbc gets compiled with Erlang, however, I can't find a package that works equivalently with FreeBSD.

I've tried installing the unixODBC package, and the libodbc++ with libiodbc packages. Neither of these work.

I've also tried download unixodbc from unixodbc.org and installing that, to no avail.

So if there's a package I can use, or if there's something I should download from source and compile, I've so far been unsuccessful in finding the solution.

Any ideas on what packages need to be installed or what steps need to be taken to ensure ODBC gets compiled with Erlang?

Note: this is with FreeBSD 9.1-Release, and Erlang R16B02

解决方案

Erlang can use unixODBC or libiodbc.

It should work when you install Erlang from ports. First, make sure your ports tree is up to date, e.g. with portsnap.

Login or su to root. Then go to /usr/ports/lang/erlang, and run make config. You should then see the following screen:

       ┌─────────────────────────── erlang-15.b.03.1_1,3 ─────────────────────────────┐              
       │ ┌──────────────────────────────────────────────────────────────────────────┐ │              
       │ │+[x] DOCS      Build and/or install documentation                         │ │              
       │ │+[ ] DTRACE    Enable DTrace support (experimental)                       │ │              
       │ │+[ ] GCC       Use current GCC                                            │ │              
       │ │+[ ] GS        Enable GS application (deprecated)                         │ │              
       │ │+[ ] HIPE      Build native HiPE compiler                                 │ │              
       │ │+[ ] JAVA      Java platform support                                      │ │              
       │ │+[x] KQUEUE    Enable Kernel Poll (kqueue) support                        │ │              
       │ │+[ ] ODBC      ODBC backend                                               │ │              
       │ │+[x] OPENSSL   SSL/TLS support via OpenSSL                                │ │              
       │ │+[x] SCTP      Enable SCTP support                                        │ │              
       │ │+[x] SMP       Enable SMP support                                         │ │              
       │ │+[x] THREADS   Threading support                                          │ │              
       │ │+[ ] WX        Enable WX application                                      │ │              
       │ │─────────────────────────────── ODBC backend ─────────────────────────────│ │              
       │ │+( ) IODBC     ODBC backend via iODBC                                     │ │              
       │ │+( ) UNIXODBC  ODBC backend via unixODBC                                  │ │              
       │ └──────────────────────────────────────────────────────────────────────────┘ │              
       ├──────────────────────────────────────────────────────────────────────────────┤              
       │                       <  OK  >            <Cancel>                           │              
       └──────────────────────────────────────────────────────────────────────────────┘              

Select either the IOBDC or the UNIXODBC option. Then run the command make install clean as root. That should build and install Erlang and all its dependencies.

Edit: if you don't want to use ports, make sure you have either databases/unixODBC or databases/libiodbc installed before compiling erlang, and then use the --with-odbc option with erlang's configure, it should work fine. That is what the port does.

这篇关于FreeBSD相当于unixodbc-dev的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆