我正在尝试修复一个旧程序,我以前遇到的问题可以在Missing modversions.h 中找到
当我make程序时,它给了我以下错误,
kaodv-mod.c:22:27: fatal error: linux/version.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
所以我跑了
find / -name version.h
Run Code Online (Sandbox Code Playgroud)
返回
/opt/VBoxGuestAdditions-4.3.2/src/vboxguest-4.3.2/vboxguest/include/VBox/version.h
/usr/include/linux/dvb/version.h
/usr/include/linux/version.h
/usr/src/linux-headers-3.8.0-29-generic/include/config/arch/want/ipc/parse/version.h
/usr/src/linux-headers-3.8.0-29-generic/include/generated/uapi/linux/version.h
/usr/src/linux-headers-3.8.0-29/include/uapi/linux/dvb/version.h
/usr/src/linux-headers-3.8.0-29/include/xen/interface/version.h
Run Code Online (Sandbox Code Playgroud)
这清楚地证明linux/version.h存在
为了解决这个问题,我应该改变
kaodv-mod.c:22:27: fatal error: linux/version.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
进入
#include</usr/include/linux/version.h>
Run Code Online (Sandbox Code Playgroud)
或者是否可以对 Makefile 进行更改
PS:生成文件
当我尝试从 tarball 安装 openvpn 时,出现以下错误
检查 C 编译器是否工作...没有
配置:错误:在`/home/shubhamd/Downloads/openvpn-2.3.2':配置:错误:C 编译器无法创建可执行文件有关更多详细信息,请参阅“config.log”
和 config.log 如下:
此文件包含编译器生成的任何消息,同时 运行configure,以在configure 出错时帮助调试。 它是由 OpenVPN configure 2.3.2 创建的,它是 由 GNU Autoconf 2.69 生成。调用命令行是 $ ./配置 ## --------- ## ## 平台。## ## --------- ## 主机名 = shubhamd uname -m = x86_64 uname -r = 3.11.0-12-generic uname -s = Linux uname -v = #19-Ubuntu SMP 星期三 10 月 9 日 16:20:46 UTC 2013 /usr/bin/uname -p = 未知 /bin/uname -X = 未知 /bin/arch = 未知 /usr/bin/arch -k = 未知 …
我有一个需要使用 pcap 库的编程任务。
#define _BSD_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pcap.h> // <-- missing include
#include <netinet/ip.h>
#include <netinet/tcp.h>
void logpacket( unsigned char* payload, struct ip* ipheader, struct tcphdr* tcpheader )
{
//...
}
int main(int argc, char* argv[] )
{
//...
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能获得编译这个程序所需的库文件?
我正在尝试freeswitch在 Ubuntu上构建并且缺少许多库。其中之一是speex。configure说它不存在,而dpkg说它在这里:
checking for speex >= 1.2rc1 speexdsp >= 1.2rc1... Package speex was not found in the pkg-config search path. Perhaps you should add the directory containing `speex.pc' to the PKG_CONFIG_PATH environment variable No package 'speex' found Package speexdsp was not found in the pkg-config search path. Perhaps you should add the directory containing `speexdsp.pc' to the PKG_CONFIG_PATH environment variable No package 'speexdsp' found
configure: error: Library requirements (speex >= 1.2rc1 speexdsp …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 14.04 上遇到此错误:
checking for X... libraries , headers /usr/include/X11/
configure: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我已经通过运行安装 libcurl:
sudo apt-get install libcurl4-gnutls-dev
现在,该文件夹位于我的
/usr/share/doc/libcurl4-gnutls-dev/examples$.
说我要编译ftpget.c。我怎么做?
我尝试编译下面的代码:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <term.h>
//#include "/usr/include/term.h"
void clear_screen(void) {
if (!cur_term) {
int result;
setupterm( NULL, STDOUT_FILENO, &result );
if (result <= 0)
return;
}
putp( tigetstr( "clear" ) );
}
int main(void) {
puts("I am going to clear the screen");
sleep(1);
clear_screen();
puts("Screen Cleared");
sleep(1);
clear_screen();
return 0;
}
Run Code Online (Sandbox Code Playgroud)
该程序测试使用term.h头文件清除终端屏幕的功能。我已经安装了所有需要的库:libncurses5并且libncurses5-dev当我编译带有或不带有-lncurses,-lcurses和-lterminfo参数的gcc程序到编译器时,我得到了上面的输出:
In file included from clear_screen_UNIX.c:5:0:
clear_screen_UNIX.c:9:6: error: expected ‘=’, ‘,’, …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 上使用 VMWare Player 并在其上运行不同数量的虚拟机。
它一直工作到 14.10,当内核升级时,我会被要求重新编译模块等;但它不再适用于 Ubuntu 15.04。
问题是它在尝试重新编译“虚拟网络适配器”时失败。我该如何解决?
我正在尝试编译mate-desktop
但是当我运行./autogen.sh脚本时会出现这些错误
Checking for required M4 macros...
libtool.m4 not found
glib-gettext.m4 not found
intltool.m4 not found
pkg.m4 not found
gtk-doc.m4 not found
yelp.m4 not found
***Error***: some autoconf macros required to build mate-desktop
were not found in your aclocal path, or some forbidden
macros were found. Perhaps you need to adjust your
ACLOCAL_FLAGS?
Run Code Online (Sandbox Code Playgroud)
我需要做什么才能摆脱这些错误?我厌倦了安装最新版本的 inittool、glib、gtk、yelp 等……但我仍然收到宏错误。
如果这有什么不同的话,我正在运行 Ubuntu 14.04 32 位的 VM...
我跟着这个问题的答案:
如何在 Ubuntu 15.04 上编译 libimobiledevice 1.2?
但是我在尝试时遇到了错误
./autogen.sh
Run Code Online (Sandbox Code Playgroud)
它说我需要更新版本的 libplist,所以我按照 libplist github 页面上的安装说明进行操作。这似乎安装没有问题,现在我解决了这个错误,./autogen.sh 抛出了这个错误......
这是它运行的最后一行,然后是我在终端中遇到的错误...
#define LT_OBJDIR ".libs/"
checking for libplist Cython bindings... no
configure: WARNING: cannot find libplist Cython bindings. You should
install your distribution specific libplist Cython bindings package.
checking for openssl... no
configure: error: OpenSSL support explicitly requested but OpenSSL could
not be found
Run Code Online (Sandbox Code Playgroud)
试图做一个 sudo apt-get install openssl 但它说它已经安装了..