libsocketcan ./configure:没有这样的文件或目录

libsocketcan ./configure:没有这样的文件或目录

我要安装libsocketcan来自我的树莓派上的源代码。我已经按照 INSTALL 文件的说明在我的 Ubunutu VM 上成功安装了 libsocketcan。不幸的是,安装的第一步在树莓派上不起作用。安装的第一步是 cd 进入目录并运行。/配置但是当我这样做时,我得到./configure:没有这样的文件或目录。在这种情况下我能做什么?我感谢您的帮助!

答案1

我终于开始./configure工作了,可以在树莓派上安装 libsocketcan 了。我做了以下事情:

首先我发现了这个类似的问题。答案建议安装autoconfautomake运行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

快速搜索建议的错误安装libtoolsudo apt-get install libtool。我这样做了,然后autoreconf -i又跑了。之后./configure终于工作了。

相关内容