1
我想在亞馬遜linux ec2實例上安裝opendkim。從源編譯時,我得到: 配置:錯誤:沒有strlcpy/strlcat發現 所以我從源碼安裝了libbsd。一旦安裝,我可以去strlcat和strlcpy的手冊頁,但我無法訪問這些功能。我驗證了共享庫已安裝。該libbsd的輸出側設置規定使用的4個選項之一:鏈接到linux共享庫
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'
我跑
export LD_RUN_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib/
另外我/etc/ld.so.conf中含有
include ld.so.conf.d/*.conf
和我的/etc/ld.so.conf.d/libbsd.conf包含
/usr/local/lib/libbsd
最後檢查我libbsd庫納米-D /usr/local/lib/libbsd.so包含:
000000000000de30 T strlcat
000000000000ded0 T strlcpy
所以我的問題怎麼辦,我不是,揭露strlcat提供和是strlcpy到命令行?或者我該怎麼做「使用-Wl,-rpath -Wl,LIBDIR'鏈接器標誌」選項,或者一般來說,我在鏈接到共享庫時做了什麼錯誤?任何幫助表示讚賞。謝謝!