Linux下configure错误详解
- 格式:doc
- 大小:24.50 KB
- 文档页数:5
Linux下串口编程遇到的接收数据错误及原因Linux下串口編程遇到的接收數据錯誤及原因近日在调试串口的时候发现,另一设备向我ARM板的串口发送0x0d,我接收之后变成了0x0a,这是问题一;另外当对方向我发送一串数据,如果其中有0x11,那么我总是漏收此数,这是问题二。
由于问题莫名其妙,以为是笔记本的USB转232线缆的问题,换,问题依旧。
以为是对方设备的问题,采用串口调试助手模拟通讯设备与ARM板通讯,问题依旧。
无奈才去查看资料,最终得以解决,现总结如下:1.串口操作需要的头文件#include <stdio.h> //标准输入输出定义#include <stdlib.h> //标准函数库定义#include <unistd.h> //Unix标准函数定义#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h> //文件控制定义#include <termios.h> //POSIX中断控制定义#include <errno.h> //错误号定义2.打开串口串口位于/dev中,可作为标准文件的形式打开,其中:串口1 /dev/ttyS0串口2 /dev/ttyS1代码如下:int fd;fd = open(“/dev/ttyS0”, O_RDWR);if(fd == -1){Perror(“串口1打开失败!”);}//else//fcntl(fd, F_SETFL, FNDELAY);除了使用O_RDWR标志之外,通常还会使用O_NOCTTY和O_NDELAY这两个标志。
O_NOCTTY:告诉Unix这个程序不想成为“控制终端”控制的程序,不说明这个标志的话,任何输入都会影响你的程序。
1、 configure,这一步一般用来生成Makefile,为下一步的编译做准备,你可以通过在configure 后加上参数来对安装进行控制,比如代码:./configure –prefix=/usr 意思是将该软件安装在/usr 下面,执行文件就会安装在/usr/bin (而不是默认的/usr/local/bin),资源文件就会安装在/usr/share(而不是默认的/usr/local/share)。
同时一些软件的配置文件你可以通过指定–sys-config= 参数进行设定。
有一些软件还可以加上–with、–enable、–without、–disable 等等参数对编译加以控制,你可以通过允许 ./configure –help 察看详细的说明帮助。
2、make,这一步就是编译,大多数的源代码包都经过这一步进行编译(当然有些perl或python编写的软件需要调用perl或python来进行编译)。
如果在make 过程中出现error ,你就要记下错误代码(注意不仅仅是最后一行),然后你可以向开发者提交 bugreport(一般在 INSTALL 里有提交地址),或者你的系统少了一些依赖库等,这些需要自己仔细研究错误代码。
3、make insatll,这条命令来进行安装(当然有些软件需要先运行 make check 或 make test 来进行一些测试),这一步一般需要你有 root 权限(因为要向系统写入文件)。
-----Linux的用户可能知道,在Linux下安装一个应用程序时,一般先运行脚本configure,然后用make来编译源程序,在运行make install,最后运行make clean删除一些临时文件。
使用上述三个自动工具,就可以生成configure脚本。
运行configure脚本,就可以生成Makefile文件,然后就可以运行make、make install和make clean。
Linux命令详解(三).configure、make、makeinstall命令这些都是典型的使⽤GNU的AUTOCONF和AUTOMAKE产⽣的程序的安装步骤⼀、基本信息 1、./configure 是⽤来检测你的安装平台的⽬标特征的。
⽐如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本。
2、make 是⽤来编译的,它从Makefile中读取指令,然后编译。
3、make install是⽤来安装的,它也从Makefile中读取指令,安装到指定的位置。
注意:AUTOMAKE和AUTOCONF是⾮常有⽤的⽤来发布C程序的东西。
⼆、详细解释 1、configure命令 这⼀步⼀般⽤来⽣成 Makefile,为下⼀步的编译做准备,你可以通过在 configure 后加上参数来对安装进⾏控制,⽐如代码:./configure –prefix=/usr 意思是将该软件安装在 /usr 下⾯,执⾏⽂件就会安装在 /usr/bin (⽽不是默认的 /usr/local/bin),资源⽂件就会安装在/usr/share(⽽不是默认的/usr/local/share)。
同时⼀些软件的配置⽂件你可以通过指定 –sys-config= 参数进⾏设定。
有⼀些软件还可以加上–with、–enable、–without、–disable 等等参数对编译加以控制,你可以通过允许 ./configure –help 察看详细的说明帮助。
2、make 这⼀步就是编译,⼤多数的源代码包都经过这⼀步进⾏编译(当然有些perl或python编写的软件需要调⽤perl或python来进⾏编译)。
如果在 make 过程中出现 error ,你就要记下错误代码(注意不仅仅是最后⼀⾏),然后你可以向开发者提交 bugreport(⼀般在 INSTALL ⾥有提交地址),或者你的系统少了⼀些依赖库等,这些需要⾃⼰仔细研究错误代码。
linux expect syntax error【解决Linux expect语法错误问题】简介:Linux expect是一个自动化交互脚本工具,通过模拟用户输入和对输出的响应,实现自动化任务的执行。
在使用Linux expect时,可能会遇到语法错误的问题。
本文将以解决Linux expect语法错误问题为主题,从原因分析到解决方案,一步一步回答,并提供相关案例和建议。
正文:第一步: 理解Linux expect语法错误的原因在使用Linux expect过程中,语法错误可能由多种原因引起。
常见的原因包括:1. 语法错误: 在编写expect脚本时,可能会因为拼写错误、缺少符号或使用错误的语法结构等而导致语法错误。
2. 脚本执行错误: expect脚本在执行过程中,可能会遭遇未预料到的输入或输出,从而导致语法错误。
3. 环境配置问题: Linux expect脚本依赖于正确的环境配置,如安装expect工具、设置正确的环境变量等。
如果这些配置存在问题,也可能导致语法错误。
第二步: 分析并定位语法错误一旦遇到语法错误,我们需要通过分析和定位错误来解决问题。
下面是一些常见的方法:1. 仔细检查脚本: 检查脚本中可能存在的拼写错误、符号错误以及语法结构错误等。
特别注意与引号配对使用的情况。
2. 运行脚本进行调试: 可以尝试直接运行脚本并观察错误提示信息。
根据提示信息,定位错误的具体位置。
3. 查看脚本日志: 在脚本中添加日志记录功能,以便在执行过程中输出相关信息。
通过查看日志,可以追踪错误发生的原因。
第三步: 解决语法错误一旦定位并分析了语法错误,我们可以针对具体情况采取相应的解决措施。
下面是一些常见的解决方案:1. 修正语法错误: 找到并修复脚本中存在的语法错误。
可以参考相关文档或教程提供的正确语法进行修改。
2. 调整脚本逻辑: 如果脚本在执行过程中遭遇未预料到的输入或输出,可以通过调整脚本逻辑来解决语法错误。
Dbus移植步骤1.进入dbus的目录运行./configure --host=arm-linux--prefix=/bluetooth/dbus2.出现错误can not run test program while cross compiling[mystic@moolenaar]$ . checking for getpeereid... nochecking abstract socket namespace... configure: error: cannot run test program while cross compilingSee `config.log' for more details.执行./configure时要在宿主系统中运行一些测试程序,因为是交叉编译所以这个测试是一定通不过的。
不过没问题,我们可以在configure 时指定cache-file文件来屏障掉测试程序,在下面编译glib包时会遇到同样的问题。
处理方法:在源码包根目录下执行[mystic@moolenaar]$ echo ac_cv_have_abstract_sockets=yes >arm-linux.cache或者自己新建一个文件,vim arm-linux.cache在里面输入:ac_cv_have_abstract_sockets=yes[mystic@moolenaar]$ ./configure --host=arm-linux--prefix=/bluetooth/dbus --cache-file=arm-linux.cache参数解释:--prefix指定编译好的文件存放的路径,默认会放到/usr/bin下--host 指定编译器的类型,这里指定为arm-linux交叉编译,默认是本机的gcc编译--cache 指定测试的信息写的地方,这里是写到了arm-linux.cache里面一会会提示缺少xml库,下载libxlm2,解压后:./configure –-prefix=/bluetooth/libxml –-host=arm-linuxmake ->make install编译完成后一定要检查libxml/lib下的库文件的格式是否是ARM的,否则不能用。
dpkg --configure -a
linux系统安装软件是有时会碰到“dpkg 被中断,您必须手工运行sudo dpkg –configure -a解决此问题”,然而按照提示运行却并没能很好的解决问题。
其实导致这个问题的主要原因是因为
/var/lib/dpkg/updates文件下的文件有问题,可能是其他软件安装过程或是其他原因导致的,这里删除掉然后重建即可。
sudo rm /var/lib/dpkg/updates/*
sudo apt-get update
sudo apt-get upgrade
解释:[*]sudo apt-get update指令会重新建立这些资料,所以不必担心删除后会出问题;
[*]sudo apt-get upgrade会更新你的电脑里面已安装的软件的明细,根据软件的明细更新软件到最新版。
PS:“dpkg ”是“Debian Packager ”的简写。
为“Debian”专门开发的套件管理系统,方便软件的安装、更新及移除。
所有源自“Debian”的“Linux ”发行版都使用“dpkg”。
Linux系统常见的网络连接问题及解决方案详解在使用Linux系统过程中,我们经常会遇到各种网络连接问题。
本文将详细介绍几种常见的网络连接问题,并提供相应的解决方案。
一、无法连接到网络无法连接到网络是最常见的网络问题之一。
当我们无法连接到网络时,首先需要确认以下几点:1. 网络连接是否正常:检查网络连接是否已启用,确保网络线缆连接到正确的接口上。
2. IP地址是否配置正确:通过 ifconfig 命令检查当前网络接口的IP地址和子网掩码是否配置正确。
3. DNS解析是否正常:配置 DNS 服务器的地址,可通过编辑/etc/resolv.conf 文件来指定 DNS 服务器地址。
若以上检查都正常,而仍无法连接到网络,则可能有以下原因导致:1. 防火墙配置问题:检查防火墙是否阻止了网络连接。
可以使用iptables 命令来查看、修改防火墙规则。
2. 硬件问题:检查网卡是否正常工作,可以通过 lspci 命令查看系统中是否存在网卡设备。
3. 路由器配置问题:检查路由器的配置,确保网络设置正确。
二、网络延迟高网络延迟高会导致网络连接变慢或不稳定。
以下是一些降低网络延迟的解决方案:1. 检查网络带宽:使用网速测试工具(如speedtest-cli)检查当前网络带宽情况。
如果带宽使用率过高,可以考虑限制某些应用程序的带宽使用。
2. 优化网络设置:调整系统的TCP参数,可以使用 sysctl 命令来修改。
例如,通过增加tcp_fin_timeout 值来减少关闭连接时的等待时间。
3. 检查网络设备:检查路由器、交换机等网络设备是否正常工作。
可以尝试重新启动这些设备,或升级其固件。
三、无法解析域名无法解析域名是指无法通过域名获取相应的IP地址。
解决这个问题可以从以下几个方面入手:1. 检查DNS配置:查看 /etc/resolv.conf 文件,确认已正确配置DNS 服务器的地址。
也可以尝试更换为其他的DNS服务器地址,如Google DNS(8.8.8.8)。
详解Linux安装GCC⽅法下载:浏览:查看Changes:现在很多程序员都应⽤GCC,怎样才能更好的应⽤GCC。
⽬前,GCC可以⽤来编译C/C++、FORTRAN、JAVA、OBJC、ADA等语⾔的程序,可根据需要选择安装⽀持的语⾔。
本⽂以在Redhat Linux安装GCC4.1.2为例(因在项⽬开发过程中要求使⽤,没有⽤最新的GCC版本),介绍Linux安装GCC过程。
安装之前,系统中必须要有cc或者gcc等编译器,并且是可⽤的,或者⽤环境变量CC指定系统上的编译器。
如果系统上没有编译器,不能安装源代码形式的GCC 4.1.2。
如果是这种情况,可以在⽹上找⼀个与你系统相适应的如RPM等⼆进制形式的GCC软件包来安装使⽤。
本⽂介绍的是以源代码形式提供的GCC软件包的安装过程,软件包本⾝和其安装过程同样适⽤于其它Linux和Unix系统。
系统上原来的GCC编译器可能是把gcc等命令⽂件、库⽂件、头⽂件等分别存放到系统中的不同⽬录下的。
与此不同,现在GCC建议我们将⼀个版本的GCC安装在⼀个单独的⽬录下。
这样做的好处是将来不需要它的时候可以⽅便地删除整个⽬录即可(因为GCC没有uninstall功能);缺点是在安装完成后要做⼀些设置⼯作才能使编译器⼯作正常。
在本⽂中采⽤这个⽅案安装GCC 4.1.2,并且在安装完成后,仍然能够使⽤原来低版本的GCC编译器,即⼀个系统上可以同时存在并使⽤多个版本的GCC编译器。
按照本⽂提供的步骤和设置选项,即使以前没有安装过GCC,也可以在系统上安装上⼀个可⼯作的新版本的GCC编译器。
1 下载在GCC⽹站上()或者通过⽹上搜索可以查找到下载资源。
⽬前GCC的最新版本为 4.2.1。
可供下载的⽂件⼀般有两种形式:gcc-4.1.2.tar.gz和gcc-4.1.2.tar.bz2,只是压缩格式不⼀样,内容完全⼀致,下载其中⼀种即可。
2. 解压缩拷贝gcc-4.1.2.tar.bz2(我下载的压缩⽂件)到/usr/local/src(根据⾃⼰喜好选择)下,根据压缩格式,选择下⾯相应的⼀种⽅式解包(以下的“%”表⽰命令⾏提⽰符):% tar zxvf gcc-4.1.2.tar.gz或者% bzcat gcc-4.1.2.tar.bz2 | tar xvf -新⽣成的gcc-4.1.2这个⽬录被称为源⽬录,⽤${srcdir}表⽰它。
前言SVN服务器有2种运行方式:独立服务器和借助apache。
2种方式各有利弊,独立SVN服务器不结合Apache安装使用,连接独立SVN服务器也不用HTTP协议。
这是比较快捷的SVN服务器配置方法。
本次安装时使用的是独立用品方式。
SVN存储版本数据也有2种方式:BDB和FSFS。
因为BDB方式在服务器中断时,有可能锁住数据所以还是FSFS方式更安全一点,我安装时也使用的是FSFS方式。
一下载工具1. subversion-1.6.17.tar.gz2. subversion-deps-1.6.17.tar.gz这两个包可以直接到CSDN去下载,版本要一样,都是必须下载的,否则单独下载第一个包编译时就会提示缺少模块。
这两个包下载解压后会解压到同一个目录下,不需要特别指定。
二解压安装1. 解压两个包:在此之前,我已经创建了一个用户svnadmin专门用来安装管理svn的,就解压在/home/svnadmin/目录下tar -xzvf subversion-1.6.17.tar.gztar -xzvf subversion-deps-1.6.17.tar.gz2. 编译安装./configure --prefix=/home/svnadmin/subversion --without-berkeley-db //prefix指定安装的目录,without-berkeley-db表明不使用berkeley数据库//在这一步有可能不成功,是因为有一些依赖的软件没装,具体见下面“遇到的问题”makemake install//也许要sudo,看情况3. 查看是否安装成功/home/svnadmin/subversion/bin/svnserve --version//如果出现SVN的版本则证明安装成功三添加环境变量可以在/etc/profile中添加,这是全局的。
其实最好是专门添加一个svnadmin 用户,在~/.bashrc中添加即可:exprot PATH=$PATH:/home/svnadmin/subversion/bin四建立仓库1. 创建目录mkdir -p /home/svnadmin/svndata/repos1加上参数P,是如果没有父目录则自动创建注意: /home/svnadmin/svndata在这里将是所有仓库的根目录,repos1是其中的一个仓库。
.configure详解'configure'脚本有⼤量的命令⾏选项.对不同的软件包来说,这些选项可能会有变化,但是许多基本的选项是不会改变的.带上'--help'选项执⾏'configure'脚本可以看到可⽤的所有选项.尽管许多选项是很少⽤到的,但是当你为了特殊的需求⽽configure⼀个包时,知道他们的存在是很有益处的.下⾯对每⼀个选项进⾏简略的介绍:--cache-file=FILE 'configure'会在你的系统上测试存在的特性(或者bug!).为了加速随后进⾏的配置,测试的结果会存储在⼀个cache file⾥.当configure⼀个每个⼦树⾥都有'configure'脚本的复杂的源码树时,⼀个很好的cache file的存在会有很⼤帮助.--help 输出帮助信息.即使是有经验的⽤户也偶尔需要使⽤使⽤'--help'选项,因为⼀个复杂的项⽬会包含附加的选项.例如,GCC包⾥的'configure'脚本就包含了允许你控制是否⽣成和在GCC中使⽤GNU汇编器的选项.--no-create 'configure'中的⼀个主要函数会制作输出⽂件.此选项阻⽌'configure'⽣成这个⽂件.你可以认为这是⼀种演习(dry run),尽管缓存(cache)仍然被改写了.--quiet--silent 当'configure'进⾏他的测试时,会输出简要的信息来告诉⽤户正在作什么.这样作是因为'configure'可能会⽐较慢,没有这种输出的话⽤户将会被扔在⼀旁疑惑正在发⽣什么.使⽤这两个选项中的任何⼀个都会把你扔到⼀旁.(译注:这两句话⽐较有意思,原⽂是这样的:If there was no such output, the user would be left wondering what is happening. By using this option, you too can be left wondering!)--version 打印⽤来产⽣'configure'脚本的Autoconf的版本号.--prefix=PEWFIX '--prefix'是最常⽤的选项.制作出的'Makefile'会查看随此选项传递的参数,当⼀个包在安装时可以彻底的重新安置他的结构独⽴部分. 举⼀个例⼦,当安装⼀个包,例如说Emacs,下⾯的命令将会使Emacs Lisp file被安装到"/opt/gnu/share":$ ./configure --prefix=/opt/gnu--exec-prefix=EPREFIX 与'--prefix'选项类似,但是他是⽤来设置结构倚赖的⽂件的安装位置.编译好的'emacs'⼆进制⽂件就是这样⼀个问件.如果没有设置这个选项的话,默认使⽤的选项值将被设为和'--prefix'选项值⼀样.--bindir=DIR 指定⼆进制⽂件的安装位置.这⾥的⼆进制⽂件定义为可以被⽤户直接执⾏的程序.--sbindir=DIR 指定超级⼆进制⽂件的安装位置.这是⼀些通常只能由超级⽤户执⾏的程序.--libexecdir=DIR 指定可执⾏⽀持⽂件的安装位置.与⼆进制⽂件相反,这些⽂件从来不直接由⽤户执⾏,但是可以被上⾯提到的⼆进制⽂件所执⾏.--datadir=DIR 指定通⽤数据⽂件的安装位置.--sysconfdir=DIR 指定在单个机器上使⽤的只读数据的安装位置.--sharedstatedir=DIR 指定可以在多个机器上共享的可写数据的安装位置.--localstatedir=DIR 指定只能单机使⽤的可写数据的安装位置.--libdir=DIR 指定库⽂件的安装位置.--includedir=DIR 指定C头⽂件的安装位置.其他语⾔如C++的头⽂件也可以使⽤此选项.--oldincludedir=DIR 指定为除GCC外编译器安装的C头⽂件的安装位置. 指定Info格式⽂档的安装位置.Info是被GNU⼯程所使⽤的⽂档格式.--mandir=DIR 指定⼿册页的安装位置.--srcdir=DIR 这个选项对安装没有作⽤.他会告诉'configure'源码的位置.⼀般来说不⽤指定此选项,因为'configure'脚本⼀般和源码⽂件在同⼀个⽬录下.--program-prefix=PREFIX 指定将被加到所安装程序的名字上的前缀.例如,使⽤'--program-prefix=g'来configure⼀个名为'tar'的程序将会使安装的程序被命名为'gtar'.当和其他的安装选项⼀起使⽤时,这个选项只有当他被`Makefile.in'⽂件使⽤时才会⼯作.--program-suffix=SUFFIX 指定将被加到所安装程序的名字上的后缀.--program-transform-name=PROGRAM 这⾥的PROGRAM是⼀个sed脚本.当⼀个程序被安装时,他的名字将经过`sed -e PROGRAM'来产⽣安装的名字.--build=BUILD 指定软件包安装的系统平台.如果没有指定,默认值将是'--host'选项的值.--host=HOST 指定软件运⾏的系统平台.如果没有指定,将会运⾏`config.guess'来检测.--target=GARGET 指定软件⾯向(target to)的系统平台.这主要在程序语⾔⼯具如编译器和汇编器上下⽂中起作⽤.如果没有指定,默认将使⽤'--host'选项的值.--disable-FEATURE ⼀些软件包可以选择这个选项来提供为⼤型选项的编译时配置,例如使⽤Kerberos认证系统或者⼀个实验性的编译器最优配置.如果默认是提供这些特性,可以使⽤'--disable-FEATURE'来禁⽤它,这⾥'FEATURE'是特性的名字.例如:$ ./configure --disable-gui-enable-FEATURE[=ARG] 相反的,⼀些软件包可能提供了⼀些默认被禁⽌的特性,可以使⽤'--enable-FEATURE'来起⽤它.这⾥'FEATURE'是特性的名字.⼀个特性可能会接受⼀个可选的参数.例如:$ ./configure --enable-buffers=128`--enable-FEATURE=no'与上⾯提到的'--disable-FEATURE'是同义的.--with-PACKAGE[=ARG] 在⾃由软件社区⾥,有使⽤已有软件包和库的优秀传统.当⽤'configure'来配置⼀个源码树时,可以提供其他已经安装的软件包的信息.例如,倚赖于Tcl和Tk的BLT器件⼯具包.要配置BLT,可能需要给'configure'提供⼀些关于我们把Tcl和Tk装的何处的信息:$ ./configure --with-tcl=/usr/local --with-tk=/usr/local'--with-PACKAGE=no'与下⾯将提到的'--without-PACKAGE'是同义的.--without-PACKAGE 有时候你可能不想让你的软件包与系统已有的软件包交互.例如,你可能不想让你的新编译器使⽤GNU ld.通过使⽤这个选项可以做到这⼀点:$ ./configure --without-gnu-ld--x-includes=DIR 这个选项是'--with-PACKAGE'选项的⼀个特例.在Autoconf最初被开发出来时,流⾏使⽤'configure'来作为Imake的⼀个变通⽅法来制作运⾏于X的软件.'--x-includes'选项提供了向'configure'脚本指明包含X11头⽂件的⽬录的⽅法.--x-libraries=DIR 类似的,'--x-libraries'选项提供了向'configure'脚本指明包含X11库的⽬录的⽅法. 在源码树中运⾏'configure'是不必要的同时也是不好的.⼀个由'configure'产⽣的良好的'Makefile'可以构筑源码属于另⼀棵树的软件包.在⼀个独⽴于源码的树中构筑派⽣的⽂件的好处是很明显的:派⽣的⽂件,如⽬标⽂件,会凌乱的散布于源码树.这也使在另⼀个不同的系统或⽤不同的配置选项构筑同样的⽬标⽂件⾮常困难.建议使⽤三棵树:⼀棵源码树(source tree),⼀棵构筑树(build tree),⼀棵安装树(install tree).这⾥有⼀个很接近的例⼦,是使⽤这种⽅法来构筑GNU malloc包:$ gtar zxf mmalloc-1.0.tar.gz$ mkdir build && cd build$ ../mmalloc-1.0/configurecreating cache ./config.cachechecking for gcc... gccchecking whether the C compiler (gcc ) works... yeschecking whether gcc accepts -g... yeschecking for a BSD compatible install... /usr/bin/install -cchecking host system type... i586-pc-linux-gnuchecking build system type... i586-pc-linux-gnuchecking for ar... archecking for ranlib... ranlibchecking how to run the C preprocessor... gcc -Echecking for unistd.h... yeschecking for getpagesize... yeschecking for working mmap... yeschecking for limits.h... yeschecking for stddef.h... yesupdating cache ../config.cachecreating ./config.status这样这棵构筑树就被配置了,下⾯可以继续构筑和安装这个包到默认的位置'/usr/local':$ make all && make installTrackback:⼀个软件包通过编译源代码安装后,如何完全的卸载??如果原先的source还在的话,很多source的Makefile都有写uninstall规则,直接在Souce⾥make uninstall就可⾏,不过碰到⽆良作者没写的,那⼀句⼀句看Makefile⾥install部分他都⼲了些什么,然后挨个删除。
linux编译安装时常见错误解决办法configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution复制代码代码如下:yum -y install libxslt-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.复制代码代码如下:yum -y install net-snmp-develconfigure: error: Please reinstall readline - I cannot find readline.h复制代码代码如下:yum -y install readline-develconfigure: error: Cannot find pspell复制代码代码如下:yum -y install aspell-develchecking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!复制代码代码如下:yum -y install unixODBC-develconfigure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.复制代码代码如下:yum -y install libicu-develconfigure: error: utf8mime2text() has new signature, but U8TCANONICAL is missing. This should not happen. Check config.log for additional information.复制代码代码如下:yum -y install libc-client-develconfigure: error: freetype.h not found.复制代码代码如下:yum -y install freetype-develconfigure: error: xpm.h not found.复制代码代码如下:yum -y install libXpm-develconfigure: error: png.h not found.复制代码代码如下:yum -y install libpng-develconfigure: error: vpx_codec.h not found.复制代码代码如下:yum -y install libvpx-develconfigure: error: Cannot find enchant复制代码代码如下:yum -y install enchant-develconfigure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/复制代码代码如下:yum -y install libcurl-develLAOGAO added 20140907:configure: error: mcrypt.h not found. Please reinstall libmcrypt.复制代码代码如下:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gztar zxf libmcrypt-2.5.7.tar.gzcd libmcrypt-2.5.7./configuremake && make installadded 20141003:Cannot find imap复制代码代码如下:ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.soconfigure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing.复制代码代码如下:yum -y install libc-client-develCannot find ldap.h复制代码代码如下:yum -y install openldapyum -y install openldap-develconfigure: error: Cannot find ldap libraries in /usr/lib复制代码代码如下:cp -frp /usr/lib64/libldap* /usr/lib/configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path复制代码代码如下:yum -y install postgresql-develconfigure: error: Please reinstall the lib curl distribution复制代码代码如下:yum -y install curl-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.复制代码代码如下:yum -y install net-snmp-develconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution复制代码代码如下:yum -y install libxslt-develchecking for BZip2 support… yes checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution Fix:复制代码代码如下:yum -y install bzip2-develchecking for cURL support… yes checking if we should use cURL for url streams… no checking for cURL in default path… not found configure: error: Please reinstall the libcurl distribution – easy.h should be in/include/curl/Fix:复制代码代码如下:yum -y install curl-develchecking for curl_multi_strerror in -lcurl… yes checking for QDBM support… no checking for GDBM support… no checking for NDBM support… no configure: error: DBA: Could not find necessary header file(s).Fix:复制代码代码如下:yum -y install db4-develchecking for fabsf… yes checking for floorf… yes configure: error: jpeglib.h not found.Fix:复制代码代码如下:yum -y install libjpeg-develchecking for fabsf… yes checking for floorf… yes checking for jpeg_read_header in -ljpeg… yes configure: error: png.h not found. Fix:复制代码代码如下:yum -y install libpng-develchecking for png_write_image in -lpng… yes If configure fails try –with-xpm-dir=configure: error: freetype.h not found.Fix:复制代码代码如下:Reconfigure your PHP with the following option. --with-xpm-dir=/usrchecking for png_write_image in -lpng… yes configure: error: libXpm.(a|so) not found.Fix:复制代码代码如下:yum -y install libXpm-develchecking for bind_textdomain_codeset in -lc… yes checking for GNU MP support… yes configure: error: Unable to locate gmp.hFix:复制代码代码如下:yum -y install gmp-develchecking for utf8_mime2text signature… new checking for U8T_DECOMPOSE… configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.Fix:复制代码代码如下:yum -y install libc-client-develchecking for LDAP support… yes, shared checking for LDAP Cyrus SASL support… yes configure: error: Cannot find ldap.hFix:复制代码代码如下:yum -y install openldap-develchecking for mysql_set_character_set in -lmysqlclient… yes checking for mysql_stmt_next_result in -lmysqlclient… no checking for Oracle Database OCI8 support… no checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found!Fix:复制代码代码如下:yum -y install unixODBC-develchecking for PostgreSQL support for PDO… yes, shared checking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation pathFix:复制代码代码如下:yum -y install postgresql-develchecking for sqlite 3 support for PDO… yes, shared checking for PDO includes… (cached) /usr/local/src/php-5.3.7/ext checking for sqlite3 files in default path… not found configure: error: Please reinstall the sqlite3 distributionFix:复制代码代码如下:yum -y install sqlite-develchecking for utsname.domainname… yes checking for PSPELL support… yes configure: error: Cannot find pspellFix:复制代码代码如下:yum -y install aspell-develchecking whether to enable UCD SNMP hack… yes checking for default_store.h… nochecking for kstat_read in -lkstat… no checking for snmp_parse_oid in -lsnmp… no checking for init_snmp in -lsnmp… no configure: error: SNMP sanity check failed. Please check config.log for more information.Fix:复制代码代码如下:yum -y install net-snmp-develchecking whether to enable XMLWriter support… yes, shared checking for xml2-config path… (cached) /usr/bin/xml2-config checking whether libxml build works… (cached) yes checking for XSL support… yes, shared configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distributionFix:复制代码代码如下:yum -y install libxslt-develconfigure: error: xml2-config not found. Please check your libxml2 installation.Fix:复制代码代码如下:yum -y install libxml2-develchecking for PCRE headers location… configure: error: Could not find pcre.h in /usrFix:复制代码代码如下:yum -y install pcre-develconfigure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore!Fix:复制代码代码如下:yum -y install mysql-develchecking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found!Fix:复制代码代码如下:yum -y install unixODBC-develchecking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path Fix:复制代码代码如下:yum -y install postgresql-develconfigure: error: Cannot find pspellFix:复制代码代码如下:yum -y install pspell-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.Fix:复制代码代码如下:yum -y install net-snmp-develconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distributionFix:复制代码代码如下:yum -y install libxslt-develconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution复制代码代码如下:yum -y install libxslt-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.复制代码代码如下:yum -y install net-snmp-develconfigure: error: Please reinstall readline - I cannot find readline.h复制代码代码如下:yum -y install readline-develconfigure: error: Cannot find pspell复制代码代码如下:yum -y install aspell-develchecking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!复制代码代码如下:yum -y install unixODBC-develconfigure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.复制代码代码如下:yum -y install libicu-develconfigure: error: utf8mime2text() has new signature, but U8TCANONICAL is missing. This should not happen. Check config.log for additional information.复制代码代码如下:yum -y install libc-client-develconfigure: error: freetype.h not found.复制代码代码如下:yum -y install freetype-develconfigure: error: xpm.h not found.复制代码代码如下:yum -y install libXpm-develconfigure: error: png.h not found.复制代码代码如下:yum -y install libpng-develconfigure: error: vpx_codec.h not found.复制代码代码如下:yum -y install libvpx-develconfigure: error: Cannot find enchant复制代码代码如下:yum -y install enchant-develconfigure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/复制代码代码如下:yum -y install libcurl-develLAOGAO added 20140907:configure: error: mcrypt.h not found. Please reinstall libmcrypt.复制代码代码如下:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gztar zxf libmcrypt-2.5.7.tar.gzcd libmcrypt-2.5.7./configuremake && make installadded 20141003:Cannot find imap复制代码代码如下:ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.soconfigure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing.复制代码代码如下:yum -y install libc-client-develCannot find ldap.h复制代码代码如下:yum -y install openldapyum -y install openldap-develconfigure: error: Cannot find ldap libraries in /usr/lib复制代码代码如下:cp -frp /usr/lib64/libldap* /usr/lib/configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path复制代码代码如下:configure: error: Please reinstall the lib curl distribution复制代码代码如下:yum -y install curl-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.复制代码代码如下:yum -y install net-snmp-develconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution复制代码代码如下:yum -y install libxslt-develchecking for BZip2 support… yes checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution Fix:复制代码代码如下:yum -y install bzip2-develchecking for cURL support… yes checking if we should use cURL for url streams… no checking for cURL in default path… not found configure: error: Please reinstall the libcurl distribution – easy.h should be in/include/curl/Fix:复制代码代码如下:yum -y install curl-develchecking for curl_multi_strerror in -lcurl… yes checking for QDBM support… no checking for GDBM support… no checking for NDBM support… no configure: error: DBA: Could not find necessary header file(s).Fix:复制代码代码如下:yum -y install db4-develchecking for fabsf… yes checking for floorf… yes configure: error: jpeglib.h not found.Fix:复制代码代码如下:yum -y install libjpeg-develchecking for fabsf… yes checking for floorf… yes checking for jpeg_read_header in -ljpeg… yes configure: error: png.h not found.Fix:复制代码代码如下:yum -y install libpng-develchecking for png_write_image in -lpng… yes If configure fails try –with-xpm-dir=configure: error: freetype.h not found.Fix:复制代码代码如下:Reconfigure your PHP with the following option. --with-xpm-dir=/usrchecking for png_write_image in -lpng… yes configure: error: libXpm.(a|so) not found.Fix:复制代码代码如下:yum -y install libXpm-develchecking for bind_textdomain_codeset in -lc… yes checking for GNU MP support… yes configure: error: Unable to locate gmp.hFix:复制代码代码如下:yum -y install gmp-develchecking for utf8_mime2text signature… new checking for U8T_DECOMPOSE… configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.Fix:复制代码代码如下:checking for LDAP support… yes, shared checking for LDAP Cyrus SASL support… yes configure: error: Cannot find ldap.hFix:复制代码代码如下:yum -y install openldap-develchecking for mysql_set_character_set in -lmysqlclient… yes checking for mysql_stmt_next_result in -lmysqlclient… no checking for Oracle Database OCI8 support… no checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found!Fix:复制代码代码如下:yum -y install unixODBC-develchecking for PostgreSQL support for PDO… yes, shared checking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation pathFix:复制代码代码如下:yum -y install postgresql-develchecking for sqlite 3 support for PDO… yes, shared checking for PDO includes… (cached) /usr/local/src/php-5.3.7/ext checking for sqlite3 files in default path… not found configure: error: Please reinstall the sqlite3 distributionFix:复制代码代码如下:yum -y install sqlite-develchecking for utsname.domainname… yes checking for PSPELL support… yes configure: error: Cannot find pspellFix:复制代码代码如下:yum -y install aspell-develchecking whether to enable UCD SNMP hack… yes checking for default_store.h… nochecking for kstat_read in -lkstat… no checking for snmp_parse_oid in -lsnmp… no checking for init_snmp in -lsnmp… no configure: error: SNMP sanity check failed. Please check config.log for more information.Fix:复制代码代码如下:yum -y install net-snmp-develchecking whether to enable XMLWriter support… yes, shared checking for xml2-config path… (cached) /usr/bin/xml2-config checking whether libxml build works… (cached) yes checking for XSL support… yes, shared configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distributionFix:复制代码代码如下:yum -y install libxslt-develconfigure: error: xml2-config not found. Please check your libxml2 installation.Fix:复制代码代码如下:yum -y install libxml2-develchecking for PCRE headers location… configure: error: Could not find pcre.h in /usrFix:复制代码代码如下:yum -y install pcre-develconfigure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore!Fix:复制代码代码如下:yum -y install mysql-develchecking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found!Fix:复制代码代码如下:yum -y install unixODBC-develchecking for pg_config… not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path Fix:复制代码代码如下:yum -y install postgresql-develconfigure: error: Cannot find pspellFix:复制代码代码如下:yum -y install pspell-develconfigure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.Fix:复制代码代码如下:yum -y install net-snmp-develconfigure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distributionFix:复制代码代码如下:yum -y install libxslt-devel。
Linux下./configure错误详解说明:sudo apt-get install package-name 更新你指定的软件包sudo apt-get update 获取更新列表sudo apt-get dist-upgrade 开始更新./configure的问题错误:C compiler cannot create executables原因:解决:sudo apt-get gcc libc6-dev错误:checking for C compiler default output... configure: error: C compiler cannot create executables 原因:解决:sudo apt-get install libc6-dev错误:configure: error: C++ preprocessor "/lib/cpp" fails sanity check原因:gcc的组件没装全解决:apt-get install build-essential错误:Can't find X includes. Please check your installation and add the correct paths!原因:没有X的包含文件解决:安装xlibs-dev即可错误:Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!原因:查找提供qt的lib&&headers的软件包,并安装之解决:apt-get install libqt3-headers libqt3-mt-dev错误:in the prefix, you've chosen, are no KDE headers installed. This will fail.So, check this please and use another prefix!原因:install a KDE application in a Gnome environment。
解决:which basically means its going to want to install a lot of KDE specific packages to work. This 'configure:error'is due to it expecting you to be running KDE and again refers to some 'headers'.sudo apt-get updatesudo apt-get install kdelibs4-dev kdelibs4c2a错误:./admin/cvs.sh: 585: autoconf: not found原因:解决:apt-get install autoconf错误:*** GTK >= 2.4.0 not installed! ***原因:没装GTK解决:apt-get build-dep gedit错误:heching for gtk-config... nochecking for GTK - version = 1.2.0... no*** The gtk-config script installed by GTK could not be found*** If GTK was installed in PREFIX, make sure PREFIX/bin is in*** your path, or set the GTK_CONFIG enviroment variable to the*** full path to gtk-config.configure: error: Cannot find GTK: Is gtk-config in path?原因:解决:sudo apt-get install libgtk1.2-dev问题:eclipse中encoding不支持中文解决:编辑/var/lib/locales/supported.d/local,加一行zh_CN.GBK GBK,执行sudo locale-gen 错误:gnome.h: No such file or directory错误:No package 'libpanelapplet-2.0' found原因:解决:sudo apt-get install gnome-panel问题:eva不弹出输入法解决:sudo apt-get install scim-qtimm问题:No package 'gtk+-2.0' foundNo package 'gtksourceview-1.0' foundNo package 'libgnomeui-2.0' foundNo package 'libglade-2.0' foundNo package 'libgnomeprintui-2.2' found解决:sudo apt-get install libgtk2.0-dev libgtksourceview-dev libgnomeui-dev libglade2-dev libgnomeprint2.2-dev问题:No package 'libpanelapplet-2.0' found解决:sudo apt-get install libpanelappletmm-2.6-dev编译安装Pidgin 的步骤1. 下载Pidgin 的源代码包pidgin-2.1.1.tar.bz2 (官方最新的版本)。
wget /sourceforge/pidgin/pidgin-2.1.1.tar.bz22. 安装编译Pidgin 所需的依赖:sudo apt-get install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev3. 解压源代码包tar jxvf pidgin-2.1.1.tar.bz2cd pidgin-2.1.14. 编译./configure (建议使用–help 查询需要用到的参数)makesudo make install如果在./configure 这一步出现错误错误一:configure: error:You must have the GTK+ 2.0 development headers installed to compile Pidgin.If you only want to build Finch then specify –disable-gtkui when running configure.解决:sudo apt-get install libgtk2.0-dev错误二:configure: error:You must have libxml2 >= 2.6.0 development headers installed to build.解决:sudo apt-get install libxml2-dev错误三:configure: error:The msgfmt command is required to build libpurple. If it is installed on your system, ensure that it is in your path. If it is not, install GNU gettext to continue.解决:sudo apt-get install gettext如果在使用GTalk 或MSN 时出现错误错误:SSL Library/Libraries……… : None (MSN and Google Talk will not workwithout SSL!)解决:sudo apt-get install libnss-dev libnspr-devUbuntu编译时找不到Makefile的解决办法ZDNet 软件频道更新时间:2007-09-26作者:korn 来源:赛迪网本文关键词:Ubuntu Proftp如果是需要编译的环境,推荐安装"build essential"包,#sudo apt-get install "build-essential"在用./configure ,make , makeinstall ,方法安装软件是,经常会发生发生各种错误,而导致无法生成makefile 文件。
现在我把我安装过程中遇到的问题以及解决办法写下来,希望对大家有点帮助。
以我安装pidgin-2.0.0为例#./configure 出现错误:configure: error: C compiler cannot create executables按照错误提示安装缺少的包#sudo apt-get install libc6-dev再次#./configure出现错误checking for GLIB... nonoconfigure: error:You must have the GLib 2.0 development headers installed to build.根据错误提示,用新得立搜索GLib 2.0 或者用命令#sudo apt-cache search GLib 2.0发现有个包libglib2.0-dev - Development files for the GLib library 。
选择安装;#sudo apt-get install libglib2.0-dev这里原文为libglib2.0-0-dev,似乎有误。
#./configure #又出现错误checking for X... nochecking for GTK... nonoconfigure: error:You must have the GTK+ 2.0 development headers installed to compile Pidgin. If you only want to build Finch then specify --disable-gtkui when running configure.用如上同样的方法查找到缺少的包并安装sudo apt-get install libgtkmm2.0-dev./configure 出现错误checking for LIBXML... nonoconfigure: error:You must have libxml2 >= 2.6.0 development headers installed to build.于是安装sudo apt-get install libxml2-dev经过上面包的安装,在次./configure 没有再出现错误,这次成功的生成了makefile 文件。