当我执行此命令时:
sudo port clean sqlite3
sudo port install sqlite3
我收到此错误:
---> Computing dependencies for sqlite3
---> Fetching sqlite3
---> Verifying checksum(s) for sqlite3
---> Extracting sqlite3
---> Configuring sqlite3
---> Building sqlite3
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.6.18" && /usr/bin/gnumake all " returned error 2
Command output: libtool: compile: /usr/bin/gcc-4.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.6.18 -I/opt/local/include -O2 -arch x86_64 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
./libtool --mode=link /usr/bin/gcc-4.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.6.18 -I/opt/local/include -O2 -arch x86_64 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -L/opt/local/lib -o libsqlite3.la sqlite3.lo \
-rpath "/opt/local/lib" -version-info "8:6:8"
libtool: link: /usr/bin/gcc-4.2 -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libsqlite3.0.dylib .libs/sqlite3.o -L/opt/local/lib -arch x86_64 -install_name /opt/local/lib/libsqlite3.0.dylib -compatibility_version 9 -current_version 9.6 -Wl,-single_module
libtool: link: dsymutil .libs/libsqlite3.0.dylib || :
warning: no debug symbols in executable (-arch x86_64)
libtool: link: (cd ".libs" && rm -f "libsqlite3.dylib" && ln -s "libsqlite3.0.dylib" "libsqlite3.dylib")
libtool: link: ar cru .libs/libsqlite3.a sqlite3.o
libtool: link: ranlib .libs/libsqlite3.a
libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s "../libsqlite3.la" "libsqlite3.la" )
./libtool --mode=link /usr/bin/gcc-4.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.6.18 -I/opt/local/include -O2 -arch x86_64 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -L/opt/local/lib -DHAVE_READLINE=1 -I/opt/local/include \
-o sqlite3 ./src/shell.c libsqlite3.la \
-L/opt/local/lib -lreadline -lm -lncurses -rpath "/opt/local/lib"
libtool: link: /usr/bin/gcc-4.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.6.18 -I/opt/local/include -O2 -arch x86_64 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DHAVE_READLINE=1 -I/opt/local/include -o .libs/sqlite3 ./src/shell.c -L/opt/local/lib ./.libs/libsqlite3.dylib -lreadline -lm -lncurses
ld: warning: in /opt/local/lib/libreadline.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libncurses.dylib, file is not of required architecture
Undefined symbols:
"_readline", referenced from:
_process_input in ccGpsFnz.o
"_add_history", referenced from:
_process_input in ccGpsFnz.o
"_read_history", referenced from:
_main in ccGpsFnz.o
"_stifle_history", referenced from:
_main in ccGpsFnz.o
"_write_history", referenced from:
_main in ccGpsFnz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
gnumake: *** [sqlite3] Error 1
Error: Status 1 encountered during processing.
我已经为Mac OS X 10.6 Snow Leopard安装了开发人员工具Xcode 3.2,我已经更新到最新版本的MacPorts并同步了我的ports树。我可以通过MacPorts安装其他东西。
答案 0 :(得分:3)
尝试在macports中停用readline,然后重新安装sqlite3。当我遇到这个问题时,这似乎可以安装它。
sudo port deactivate readline
sudo port install sqlite3
答案 1 :(得分:2)
解决方案是重新安装所有端口,因为我已升级到新的操作系统版本(10.5 - > 10.6)。
有关详细信息,请查看第一个答案here
重新安装端口