对于遗留项目,我必须安装 ruby-dbi ( dbi-0.1.1
)。当我尝试运行sudo ruby setup.rb setup
时,出现以下安装错误:
eianni@ianni-desktop:~/Desktop/ruby-dbi$ sudo ruby setup.rb setup
entering setup phase...
setting #! line to "#!/usr/bin/ruby1.8"
setting #! line to "#!/usr/bin/ruby1.8"
make clean
/usr/bin/ruby1.8 extconf.rb
creating Makefile
make
gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/freetds/include -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c dbd_sybase.c
dbd_sybase.c:29:17: error: tds.h: No such file or directory
dbd_sybase.c:33: error: expected specifier-qualifier-list before ‘TDSSOCKET’
dbd_sybase.c:62: error: expected declaration specifiers or ‘...’ before ‘TDSSOCKET’
dbd_sybase.c:63: error: expected ‘)’ before ‘*’ token
dbd_sybase.c: In function ‘dh_init’:
dbd_sybase.c:82: error: ‘TDSSOCKET’ undeclared (first use in this function)
dbd_sybase.c:82: error: (Each undeclared identifier is reported only once
dbd_sybase.c:82: error: for each function it appears in.)
dbd_sybase.c:82: error: ‘tds’ undeclared (first use in this function)
dbd_sybase.c:102: error: expected expression before ‘)’ token
dbd_sybase.c:107: error: ‘TDS_SUCCEED’ undeclared (first use in this function)
dbd_sybase.c: In function ‘dh_do’:
dbd_sybase.c:122: error: ‘TDSSOCKET’ undeclared (first use in this function)
dbd_sybase.c:122: error: ‘tds’ undeclared (first use in this function)
dbd_sybase.c:124: error: expected expression before ‘)’ token
dbd_sybase.c:126: error: ‘TDS_SUCCEED’ undeclared (first use in this function)
dbd_sybase.c: In function ‘dh_disconnect’:
dbd_sybase.c:155: error: ‘TDSSOCKET’ undeclared (first use in this function)
dbd_sybase.c:155: error: ‘tds’ undeclared (first use in this function)
dbd_sybase.c:157: error: expected expression before ‘)’ token
dbd_sybase.c: In function ‘rh_new’:
dbd_sybase.c:170: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:170: error: ‘TDSSOCKET’ undeclared (first use in this function)
dbd_sybase.c:170: error: expected expression before ‘)’ token
dbd_sybase.c:171: error: ‘SYBRESULT’ has no member named ‘sqlstring’
dbd_sybase.c: In function ‘rh_init’:
dbd_sybase.c:192: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:192: error: ‘SYBRESULT’ has no member named ‘sqlstring’
dbd_sybase.c:192: error: ‘TDS_SUCCEED’ undeclared (first use in this function)
dbd_sybase.c:204: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:206: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:209: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:216: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:217: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:226: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:226: error: too many arguments to function ‘value_as_string’
dbd_sybase.c:233: error: ‘TDS_FAIL’ undeclared (first use in this function)
dbd_sybase.c:237: error: ‘TDS_NO_MORE_ROWS’ undeclared (first use in this function)
dbd_sybase.c:249: error: ‘TDS_NO_MORE_RESULTS’ undeclared (first use in this function)
dbd_sybase.c: In function ‘rh_fetch_fields’:
dbd_sybase.c:276: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c:279: error: ‘SYBRESULT’ has no member named ‘tds’
dbd_sybase.c: In function ‘tdsl_new’:
dbd_sybase.c:303: error: ‘TDSLOGIN’ undeclared (first use in this function)
dbd_sybase.c:303: error: ‘login’ undeclared (first use in this function)
dbd_sybase.c: In function ‘tdsl_init’:
dbd_sybase.c:318: error: ‘TDSLOGIN’ undeclared (first use in this function)
dbd_sybase.c:318: error: ‘login’ undeclared (first use in this function)
dbd_sybase.c:322: error: expected expression before ‘)’ token
dbd_sybase.c: In function ‘tdss_new’:
dbd_sybase.c:344: error: ‘TDSLOGIN’ undeclared (first use in this function)
dbd_sybase.c:344: error: ‘login’ undeclared (first use in this function)
dbd_sybase.c:345: error: ‘TDSSOCKET’ undeclared (first use in this function)
dbd_sybase.c:345: error: ‘tds’ undeclared (first use in this function)
dbd_sybase.c:352: error: expected expression before ‘)’ token
dbd_sybase.c: At top level:
dbd_sybase.c:383: error: expected declaration specifiers or ‘...’ before ‘TDSSOCKET’
dbd_sybase.c: In function ‘value_as_string’:
dbd_sybase.c:389: error: ‘tds’ undeclared (first use in this function)
dbd_sybase.c:396: error: ‘SYBNTEXT’ undeclared (first use in this function)
dbd_sybase.c:396: error: ‘SYBTEXT’ undeclared (first use in this function)
dbd_sybase.c:401: error: ‘SYBVARCHAR’ undeclared (first use in this function)
dbd_sybase.c: At top level:
dbd_sybase.c:406: error: expected ‘)’ before ‘*’ token
make: *** [dbd_sybase.o] Error 1
setup failed
'system make' failed
找不到是什么鬼tds.h
。我正在运行 Ubuntu 10.04,我刚刚找到freetds
但没有找到开发包。