Linux
libsocketcan ./configure:沒有這樣的文件或目錄
我想在我的樹莓派上從原始碼安裝libsocketcan 。我已經按照安裝文件的說明在我的 Ubunutu VM 上成功安裝了 libsocketcan。不幸的是,安裝的第一步不是在樹莓派上工作。安裝的第一步是 cd 進入目錄並執行**./configure**但是當我這樣做時,我得到 ./configure: No such file or directory。在這種情況下我能做什麼?我感謝您的幫助!
我終於
./configure
以某種方式開始工作,可以在樹莓派上安裝 libsocketcan。我做了以下事情:首先我發現了這個類似的問題。答案建議安裝
autoconf
並automake
執行autoreconf -i
。完成此操作後,我./configure
至少可以執行,但出現以下錯誤:pi@RPI4:~/Repositorys/libsocketcan-0.0.12 $ ./configure checking build system type... armv7l-unknown-linux-gnueabihf checking host system type... armv7l-unknown-linux-gnueabihf checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes ./configure: line 3175: syntax error near unexpected token `win32-dll' ./configure: line 3175: `LT_INIT(win32-dll)'
我
autoreconf -i
再次執行,我突然得到了這個不同的輸出:src/GNUmakefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined src/GNUmakefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT' src/GNUmakefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again. src/GNUmakefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure src/GNUmakefile.am:1: its definition is in aclocal's search path. autoreconf: automake failed with exit status: 1
快速搜尋錯誤建議使用
sudo apt-get install libtool
. 我這樣做了,然後又跑autoreconf -i
了。在此之後 ./configure 終於起作用了。