我正在尝试从源代码构建 rpm。我读完了./configure
并浏览了很大一部分make
。不幸的是,我一直被未定义的引用所bzerror
困扰。在网上查了一下,我发现这些功能是包的一部分。我已经安装了开发库,但仍然收到此消息。任何人都可以帮助我解决这些依赖关系吗?bzwrite
bzflush
bzip2
make[2]: Entering directory `/mnt/fedRoot/rpm-4.6.1/lib'
make all-am
make[3]: Entering directory `/mnt/fedRoot/rpm-4.6.1/lib'
/bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts -fno-strict-aliasing -fstack-protector -o rpmdb_archive ../db3/db_archive.o ../db3/util_sig.o librpm.la -lrt -lpthread
gcc -std=gnu99 -g -O2 -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts -fno-strict-aliasing -fstack-protector -o .libs/rpmdb_archive ../db3/db_archive.o ../db3/util_sig.o ./.libs/librpm.so /mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so -lmagic -lelf -llua -lm -lnss3 -lpopt -lrt -lpthread -Wl,--rpath -Wl,/usr/local/lib
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzerror'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzwrite'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzflush'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzdopen'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzread'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzclose'
/mnt/fedRoot/rpm-4.6.1/rpmio/.libs/librpmio.so: undefined reference to `bzopen'
collect2: ld returned 1 exit status
make[3]: *** [rpmdb_archive] Error 1
make[3]: Leaving directory `/mnt/fedRoot/rpm-4.6.1/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/fedRoot/rpm-4.6.1/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/fedRoot/rpm-4.6.1'
make: *** [all] Error 2
答案1
这些库必须由 来获取configure
。如果您运行configure
,然后安装了 bzip2 开发文件,然后重新运行configure
,它可能仍然从缓存中选择了错误的信息。跑make distclean
,然后./configure
再跑一次。