インストールしたいデータベースツールソースから
次のエラーが発生します。
fatal error: sql.h: No such file or directory
だから私は次の解決策を読んだが、よく理解されていない。
https://forums.freebsd.org/threads/46299/ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189382
私は次のことをしました。
$ sudo apt install libtool automake autoconf glib2.0 byacc unixodbc
$ cd ~/Downloads && git clone https://github.com/brianb/mdbtools
$ autoreconf -i -f
$ export DOCBOOK_DSL=/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl
$ ./configure --with-unixodbc=/usr/local
$ make
$ make install
これはフル出力make install
コマンドから
ご協力ありがとうございます
--->> sudo make install
Making install in src
make[1]: Entering directory '/home/fabrizio/Downloads/mdbtools/src'
Making install in libmdb
make[2]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/libmdb'
make[3]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/libmdb'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ../../libtool --mode=install /usr/bin/install -c libmdb.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libmdb.so.2.0.1 /usr/local/lib/libmdb.so.2.0.1
libtool: install: (cd /usr/local/lib && { ln -s -f libmdb.so.2.0.1 libmdb.so.2 || { rm -f libmdb.so.2 && ln -s libmdb.so.2.0.1 libmdb.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libmdb.so.2.0.1 libmdb.so || { rm -f libmdb.so && ln -s libmdb.so.2.0.1 libmdb.so; }; })
libtool: install: /usr/bin/install -c .libs/libmdb.lai /usr/local/lib/libmdb.la
libtool: install: /usr/bin/install -c .libs/libmdb.a /usr/local/lib/libmdb.a
libtool: install: chmod 644 /usr/local/lib/libmdb.a
libtool: install: ranlib /usr/local/lib/libmdb.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/libmdb'
make[2]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/libmdb'
Making install in extras
make[2]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/extras'
make[3]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/extras'
/bin/mkdir -p '/usr/local/bin'
/bin/bash ../../libtool --mode=install /usr/bin/install -c mdb-hexdump '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/mdb-hexdump /usr/local/bin/mdb-hexdump
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/extras'
make[2]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/extras'
Making install in sql
make[2]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/sql'
make install-am
make[3]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/sql'
make[4]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/sql'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ../../libtool --mode=install /usr/bin/install -c libmdbsql.la '/usr/local/lib'
libtool: warning: relinking 'libmdbsql.la'
libtool: install: (cd /home/fabrizio/Downloads/mdbtools/src/sql; /bin/bash "/home/fabrizio/Downloads/mdbtools/libtool" --silent --tag CC --mode=relink gcc -I../../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -DSQL -Wall -version-info 2:0:0 -export-symbols-regex "^mdb_sql_" -Wl,--as-needed -o libmdbsql.la -rpath /usr/local/lib mdbsql.lo parser.lo lexer.lo ../libmdb/libmdb.la -lglib-2.0 )
libtool: install: /usr/bin/install -c .libs/libmdbsql.so.2.0.0T /usr/local/lib/libmdbsql.so.2.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libmdbsql.so.2.0.0 libmdbsql.so.2 || { rm -f libmdbsql.so.2 && ln -s libmdbsql.so.2.0.0 libmdbsql.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libmdbsql.so.2.0.0 libmdbsql.so || { rm -f libmdbsql.so && ln -s libmdbsql.so.2.0.0 libmdbsql.so; }; })
libtool: install: /usr/bin/install -c .libs/libmdbsql.lai /usr/local/lib/libmdbsql.la
libtool: install: /usr/bin/install -c .libs/libmdbsql.a /usr/local/lib/libmdbsql.a
libtool: install: chmod 644 /usr/local/lib/libmdbsql.a
libtool: install: ranlib /usr/local/lib/libmdbsql.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/sql'
make[3]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/sql'
make[2]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/sql'
Making install in odbc
make[2]: Entering directory '/home/fabrizio/Downloads/mdbtools/src/odbc'
CC odbc.lo
odbc.c:24:17: fatal error: sql.h: No such file or directory
compilation terminated.
Makefile:494: recipe for target 'odbc.lo' failed
make[2]: *** [odbc.lo] Error 1
make[2]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src/odbc'
Makefile:375: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/fabrizio/Downloads/mdbtools/src'
Makefile:474: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
答え1
Ubuntuの状況を見ると、unixodbc-dev:が必要になる可能性が高くなりますsudo apt-get install unixodbc-dev
。通常、Debianベースのシステムでは、ヘッダファイル(.h
または)を提供するように求められたら、.hpp
その-dev
パッケージが必要です。