Linux系统编译安装常见错误处理方法
初学者必读Linux开发常见错误及解决方法

初学者必读Linux开发常见错误及解决方法在Linux开发的过程中,初学者经常会遇到各种错误和问题。
本文将介绍一些常见的错误,并提供相应的解决方法,帮助初学者更好地应对各种挑战。
一、命令不存在或找不到的错误在使用Linux命令时,有时会出现“Command not found”或“No command found”的错误提示。
这通常是由于命令不存在或命令所在的目录不在系统的PATH环境变量中引起的。
解决方法:1. 检查命令是否存在于系统中,可以使用命令“which 命令名”或“whereis 命令名”来查找命令的路径。
2. 如果命令存在但不在系统的PATH环境变量中,可以通过编辑~/.bashrc文件或/etc/profile文件,在其中添加命令的路径即可。
3. 更新环境变量配置后,可以使用“source ~/.bashrc”或“source /etc/profile”命令来使配置生效。
二、文件权限错误当在Linux中执行某个程序或访问某个文件时,有时会出现“Permission denied”或“Access denied”的错误提示。
这通常是由于当前用户对该文件或目录没有足够的权限引起的。
解决方法:1. 使用“ls -l”命令查看文件或目录的权限设置,确保当前用户具有读、写、执行权限。
2. 如果当前用户没有足够的权限,可以使用“chmod”命令来修改文件或目录的权限。
例如,使用“chmod +x 文件名”为文件添加执行权限,使用“chmod 777 目录名”给目录赋予所有权限。
3. 如果需要访问的文件或目录所属于其他用户,可以使用“sudo”命令以超级用户的身份执行相关操作。
三、编译错误在进行Linux下的编程开发时,有时会遇到编译错误,如“undefined reference”、“syntax error”等。
这通常是由于代码中存在语法错误或库文件引用不正确引起的。
解决方法:1. 仔细检查代码中的语法错误,特别是标点符号、括号匹配等方面。
Linux技术使用中常见问题解答及解决方法

Linux技术使用中常见问题解答及解决方法Linux作为一种开源操作系统,受到了越来越多的用户的青睐。
然而,在使用过程中,我们难免会遇到一些问题。
本文将针对Linux技术使用中的常见问题进行解答,并提供相应的解决方法,希望能够帮助读者更好地使用Linux操作系统。
一、系统启动问题1. 问题:系统启动时出现“GRUB Error”。
解决方法:这通常是由于系统引导加载程序(GRUB)配置错误引起的。
可以尝试使用Live CD或USB启动系统,然后重新安装GRUB。
2. 问题:系统启动后黑屏。
解决方法:可能是由于显卡驱动问题导致的。
可以尝试在启动时进入恢复模式,然后更新或重新安装显卡驱动。
二、软件安装问题1. 问题:在安装软件时出现依赖错误。
解决方法:这通常是由于缺少所需的依赖库或版本不匹配引起的。
可以使用包管理器(如apt、yum等)来安装所需的依赖库或更新软件版本。
2. 问题:安装软件时遇到无法解决的依赖问题。
解决方法:可以尝试使用源码编译安装软件。
首先,下载源代码并解压缩。
然后,进入源代码目录,执行"./configure"命令进行配置,接着执行"make"命令编译,最后执行"make install"命令安装软件。
三、网络连接问题1. 问题:无法连接到互联网。
解决方法:首先,检查网络连接是否正常,包括网络线是否插好、网卡是否启用等。
其次,检查网络配置是否正确,可以使用"ifconfig"命令查看网络接口的配置信息。
最后,检查DNS配置是否正确,可以使用"cat /etc/resolv.conf"命令查看DNS配置。
2. 问题:无法访问局域网内的其他计算机。
解决方法:首先,确保局域网的网络设置正确,包括IP地址、子网掩码等。
其次,检查防火墙设置,确保允许局域网内的通信。
最后,可以尝试使用"ping"命令测试与其他计算机的连通性。
linux编译方法

linux编译方法随着信息技术的发展,Linux操作系统在各个领域中得到了广泛应用。
为了能够更好地使用和开发Linux,对于Linux的编译方法有着深入的了解是十分必要的。
本文将介绍Linux的编译方法,包括准备工作、编译过程以及常见问题的处理。
一、准备工作在进行Linux编译之前,需要进行一些准备工作来保证编译的顺利进行。
1.1 环境搭建首先,需要确保你的系统已经安装了必要的软件和工具,比如gcc编译器、make工具等。
可以通过运行以下命令来检查软件是否已经安装:```shellgcc --versionmake --version```如果显示相应软件的版本号,则表示已经安装成功。
1.2 获取源代码在开始编译之前,需要先获取源代码。
通常情况下,你可以从开源项目的官方网站或者代码托管平台上下载源代码。
通过以下命令可以从远程仓库中克隆代码到本地:```shellgit clone <repository_url>```其中`<repository_url>`是代码仓库的URL地址。
二、编译过程在准备工作完成后,就可以进行Linux的编译了。
下面介绍一般的编译过程。
2.1 配置首先,在源代码所在的目录中运行以下命令来进行配置:```shell./configure```配置命令会检查系统环境,并生成一个Makefile文件,用于后续的编译。
2.2 编译配置完成后,运行以下命令进行编译:make```编译命令会根据Makefile文件中的规则,将源代码编译为可执行文件或者库文件。
2.3 安装编译完成后,可以运行以下命令来进行安装:```shellmake install```安装命令会将编译生成的文件复制到系统指定的目录中,使得这些文件可以被系统正常调用和使用。
三、常见问题处理在进行Linux编译的过程中,可能会遇到一些常见的问题。
下面列举一些常见问题及其解决方法。
3.1 缺少依赖库在编译过程中,可能会提示缺少某些依赖库。
Linux操作系统的编译和安装

Linux操作系统的编译和安装在正文规定的字数限制下,为了准确满足标题描述的内容需求,并确保内容排版整洁美观、语句通顺、全文表达流畅且无影响阅读体验的问题,本文将按照以下格式进行写作:一、简介Linux操作系统是一种开源的、自由的Unix-like操作系统,它广泛应用于各种领域,包括服务器、嵌入式设备等。
本文将重点介绍Linux 操作系统的编译和安装过程。
二、编译准备1. 下载源代码在编译Linux操作系统之前,首先需要从官方网站下载Linux内核的源代码包。
2. 安装必要的依赖软件在编译过程中,需要安装一些必要的软件和工具,如编译器、构建工具等。
三、编译步骤1. 解压源代码包使用解压命令将下载的源代码包解压到指定目录。
2. 配置编译选项进入源代码目录,并运行配置命令,根据需要选择不同的编译选项。
3. 执行编译命令运行编译命令开始编译操作系统内核,这个过程可能需要一段时间。
四、安装步骤1. 安装编译生成的内核镜像文件将编译生成的内核镜像文件复制到合适的位置,并修改相关配置文件以引导新编译的内核。
2. 安装相关系统文件运行安装命令,将其他必要的系统文件复制到适当的位置。
五、系统配置1. 修改引导加载程序根据系统的引导加载程序,如GRUB、LILO等,修改引导配置文件以支持新安装的内核。
2. 配置网络和驱动程序根据具体需求,配置网络设置和硬件驱动程序。
六、测试与验证1. 重新启动系统重新启动计算机,并选择新编译的内核进行引导。
2. 验证系统版本和功能运行相应的命令,验证新安装的Linux操作系统版本和功能是否正确。
七、常见问题解决1. 编译错误分析编译过程中出现的错误信息,根据错误提示进行逐步修复。
2. 硬件兼容性问题部分硬件设备可能需要额外的驱动程序或补丁文件才能正常运行,根据具体情况进行相应的处理。
八、总结通过本文的介绍,读者可以了解到Linux操作系统的编译和安装过程,同时了解到在实际操作中会遇到的一些常见问题及解决方法。
Linux常见问题解答与解决方案

Linux常见问题解答与解决方案Linux作为一种广泛使用的操作系统,为用户提供了一个稳定、安全、高效的平台。
然而,就像任何其他操作系统一样,Linux也会遇到一些常见问题。
在本文中,我们将解答一些常见的Linux问题,并提供相应的解决方案。
一、安装问题1. 无法启动安装程序解决方案:检查你的硬件是否满足Linux的最低系统要求。
同时,确保你下载的安装文件没有损坏,并使用正确的安装介质。
2. 安装过程中停滞不前解决方案:尝试重新启动安装程序,确保你的安装介质没有问题。
如果问题仍然存在,可以尝试更换不同的安装介质,或者使用其他版本的Linux发行版。
二、网络问题1. 无法连接到互联网解决方案:检查你的网络设置,确保网线连接或Wi-Fi连接无问题。
可以尝试使用命令行工具如ping或curl来测试网络连通性。
另外,也要确保你的DNS设置正确。
2. 无法访问特定网站解决方案:首先确认其他网站是否能够正常访问。
如果只有一个特定的网站无法访问,可以尝试清除你的DNS缓存或刷新你的网络设置。
如果仍然无法解决问题,可能是该网站服务器出现了故障。
三、软件安装和升级问题1. 找不到软件包解决方案:确保你的软件包管理器配置正确,并更新软件包缓存。
如果你仍然找不到所需的软件包,可以尝试添加其他软件源或手动下载并安装软件包。
2. 软件包依赖问题解决方案:当安装软件包时遇到依赖错误时,可以使用软件包管理器来解决。
软件包管理器会自动解决软件包之间的依赖关系。
四、系统性能问题1. 系统运行缓慢解决方案:可以通过检查系统资源使用情况来确定是否有进程占用了过多的CPU或内存资源。
可以使用命令如top或htop来监视系统资源的使用情况。
另外,也可以尝试关闭不必要的后台服务来释放系统资源。
2. 内存不足解决方案:可以通过释放内存或增加内存的方式来解决内存不足的问题。
可以使用命令如free或top来查看内存使用情况,通过关闭不必要的程序或升级内存来解决问题。
Linux内核编译及常见错误实验报告

***学生实验报告一、实验目的(1)学习重新编译Linux内核的方法(2)理解Linux标准内核和发行版本内核的区别。
二、实验内容在Linux系统中下载同一发行版本的版本号较高的内核,编译之后运行自己编译的内核,并使用uname-r命令查看是否运行成功。
由于不同版本的内核在编译过程中可能出现不同的问题,本书推荐的内核版本为4.16.10。
从第7章开始的进阶实验篇,都可以选用该版本的内核。
三、实验设备Vmware上运行的linux ubuntu 5.11.0-43-generic实验成功:linux ubuntu 4.18.0-generic(Ubuntu18.04均可)实验成功的方法在最后四、实验过程和原理分析一、实验(一)准备工作:在这里我建议用一个全新的虚拟机,避免编译错误对原来常使用的虚拟机造成不可逆的影响,安装好后就先安装gcc、make等工具首先下载好Linux***内核文件解压至/usr/src 目录下,如下:确认安装好gcc、make等工具,后可直接运行命令sudo make menuconfig进行查看内核功能是否需要编译,如果遇到如下错误可以运行命令sudo apt bison 或sudo apt-get install fiex bison命令解决错误:解决:(不建议)(强烈建议)除此之外还可以直接运行,上一条命令解决不了就用下面这个:sudo apt-get install --reinstall bison libbison-dev flex libfl-dev解决上述错误(强烈建议)运行完上述命令后再次输入sudo make menuconfig便正常进入如下:见到这个界面后无需任何多余操作,使用键盘方向键选择<Save>回车再回车即可此时.config文件生成成功.config文件是隐藏文件记得加参数-a此外还有一个方法就是用cp 命令从原有系统的内核复制.config文件过来也可以命令:sudo cp /boot/config- 5.11.0-43-generic ./.config(二)编译内核为了避免多线程编译时同时出现过多错误,我们这里一开始只使用单线程编译在这里除了用make编译还可以用make-kpkg等工具,个人比较喜欢用make-kpkg但课本用make所以我接下来的实验也先用make完成。
编译Linux内核的错误汇总

四: make zImage 和 make xipImage Kernel configured for XIP (CONFIG_XIP_KERNEL=y) Only the xipImage target is available in this case make[1]: *** [arch/arm/boot/zImage] Error 1 make: *** [zImage] Error 2
下面是编译时产生的一些信息
1' cross compile
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin- utils executables
解决方法:修改 arch/arm/kernel/vmlinux.lds [arm@localhost linux2.6.14]$ vi arch/arm/kernel/vmlinux.lds 将文件尾 2 条的 ASSERT 注释掉(1439 行) /* ASSERT((__proc_info_end __ proc_info_begin), "missing CPU support") */ /* ASSERT((__arch_info_end __ arch_info_begin), "no machine record defined") */ 然后重新 make zImage 即可
b
/usr/local/arm/bin/arm- linux- ld:arch/arm/kernel/vmlinux.lds:782: parse error make: *** [.tmp_vmlinux1] 错误 1 ld 链接时产生错误 对应行:
linux系统下uboot、kernel、android文件系统编译错误整理及解决办法

linux系统下uboot、kernel、android文件系统编译错误整理及解决办法Ver1.0作成者:雷鹏作成年月:2012/09/251、linux下编译应用程序时出现如下错误: /usr/bin/ld: cannot find -lxxx。
原因分析:编译过程找不到对应库文件。
其中,-lxxx表示链接库文件 libxxx.so。
由于库文件是编译过程临时生成的,如果前面编译过程出错也会导致出现这种情况,下面针对本机系统环境缺失而引起的错误进行分析。
一般出现这种错误有以下几种原因:⑴.系统缺乏对应的库文件;⑵.版本不对应;⑶.库文件的链接错误;⑷.库文件路径设置问题。
解决方法:对应第一第二种情况,可以通过下载安装lib来解决,ubuntu系统可以直接通过apt-get来安装:apt-get install libxxx-dev如果还是不能解决问题,那么,引起错误的原因不是链接错误就是库文件路径问题。
通过find或者locate指令定位到链接文件,查看链接文件是否正确的指向了编译需要的lib,如果不是,用下列指令修改它。
ln -sf */libxxx.so.x */libxxx.so如果是库文件路径引发的问题,可以到/etc/ld.so.conf.d目录下,修改其中任意一份conf文件,(可以自建conf,以方便识别)将lib所在目录写进去,然后在终端输入 ldconfig 更新缓存。
2、编译时出现错误提示:include/asm is a directory but a symlink was expected原因分析:linux/include/asm 文件夹是内核编译过程中创建的,创建结果就是一个指向文件夹asm-arm 的链接,表明该系统的平台是arm架构的,而编译系统内核之前,是没有asm这个链接的,所以,在编译过程中,创建该链接时文件名字与asm文件夹的名字发生冲突,于是系统报错了。
Linux系统错误排查指南常见问题和解决方法

Linux系统错误排查指南常见问题和解决方法在使用Linux系统过程中,遇到错误是常有的事情。
本文将为你提供一些常见问题的解决方法,帮助你更好地排查和解决Linux系统错误。
一、系统启动问题当你的Linux系统无法启动时,可以尝试以下几种解决方法:1. 检查硬件连接:确保硬件设备(例如硬盘、内存等)已正确连接。
你可以重插这些设备,确保连接良好。
2. 检查文件系统:使用fsck命令检查文件系统是否有错误,并修复它们。
例如,运行命令fsck /dev/sda1来检查/dev/sda1分区。
3. 检查引导加载程序:引导加载程序(如GRUB或LILO)可能会损坏或出现配置错误,导致系统无法引导。
请检查引导加载程序的配置文件,并确保正确配置了引导项。
二、网络连接问题当你的Linux系统无法连接网络时,可以尝试以下几种解决方法:1. 检查网络适配器设置:使用ifconfig命令来检查网络适配器的设置。
确保适配器已正确配置,并且有正确的IP地址和子网掩码。
2. 检查网络连接:使用ping命令来测试与其他设备的网络连接。
如果ping命令成功,表示网络连接正常;如果ping命令失败,可能是网络故障或防火墙问题。
3. 检查网络服务:检查系统中的网络服务是否正常运行。
你可以使用systemctl命令来启动或停止服务,比如systemctl restart network.service。
三、软件安装问题当你在Linux系统中安装软件时遇到问题,可以尝试以下几种解决方法:1. 检查软件依赖性:在安装某个软件之前,确保已满足其所需的依赖包。
你可以使用命令apt-get或yum来安装依赖包。
例如,运行命令apt-get install libssl-dev安装libssl-dev库。
2. 检查软件源:如果你使用的是包管理器(如apt或yum),请检查软件源的配置是否正确。
你可以修改软件源列表,选择更快、更稳定的镜像源。
3. 检查软件安装过程:在安装软件时,确保你按照正确的步骤进行操作。
linux下程序编译的问题和方法

linux下程序编译的问题和方法gromacs经常看到有同学发帖求助各种软件编译的问题,在不同平台、不同环境下,编译可能会出现各种各样的状况,看似复杂,其实万变不离其宗,只要了解大概的编译机制,一般来说都可以自己解决。
一、编译器:编译一个程序之前首先先读一读Readme、Install或者手册上关于安装的部分,确定自己机器上的编译器是否能够用于该程序的编译。
一般c语言gcc、g++编译器即可胜任,有特殊优化需要的会使用icc。
fortran语言有的程序要求使用ifort。
常见错误:编译命令没有出现在$PATH变量中,这个是安装问题,一般用rpm包或从源安装不会有问题,Intel的编译器需要把bin中的配置变量的脚本在profile文件中自动执行。
libstdc++库的问题,有些软件使用的是5,而不是现在的6,这时需要安装compat-libstdc++-296和compat-libstdc++-33两个包。
有时需要用mpicc或mpicxx或mpif77之类的来编译,实际上它们也是调用现有的编译命令,只不过加上了自己的一些头文件和库。
改变编译器的使用一般通过改变环境变量来完成,不同的mpi实现有所不同,可以google 一下。
二、编译:编译是把程序源文件编译成目标文件,也就是把c、cpp、f等文件编译成o文件。
这一步对应的个关键环境变量是:CC(c的编译命令),FC(f的编译命令),CCFLAGS(c的编译参数),FCFLAGS(f的编译参数等)这一步只要求程序中的每个函数有明确声明就可以通过,不知道什么是声明反正就理解为头文件需要能够被找到即可。
常见错误:找不到头文件,这时需要自己确定头文件位置,把 -I[头文件路径] 参数加到对应的CCFLAGS或FCFLAGS中,编译器就知道去哪里找了。
三、链接:把o文件和lib文件件组织成可执行文件。
这也是错误最多的一个地方。
关键环境变量: LINK(其实就是前面的编译器), LDFLAGS(链接参数)关键参数:-L[库路径] 告诉链接器(LINK)去哪里找库文件-l[库名] 告诉链接器需要链接哪些库,命名方式是这样的: libxxx.a <--> -lxxx 如:libm.a <--> -lm , libmpi.a <--> -lmpi常见错误:can not find libxxx,找到需要链接的库的a文件,把路径通过-L告诉链接器unresolved xxxx 这个最常见一般google一下缺失的函数,就能知道是什么库,有就用-L和-l加入,没有就想办法装如果不能确定是一堆库文件里的哪个,有个笨方法:nm xxx.a 可以看到这个库中所有的函数名,结合 grep命令,找到像要的函数在哪个a 中,用-l加上总之多看看编译时候的报错信息,无非就那几种,总能找到解决的办法。
在linux系统上安装QT6.6后打不开或编译程序后运行报错

一种可能原因是缺少依赖文件,排查方式如下,仅供参考
1、在桌面,右键-在终端中打开【类似window的Cmd.exe,或使用快捷键
Ctrl+Alt+T打开】
2、打开QT程序所在位置,一般默认安装位置如下:
文件-主目录-QT-Tools-QtCreator-bin-qtcreator【程序文件,类似exe】
3、拖动程序文件到终端,按回车键打开
4、查看提示的错误信息,以下是我遇到的错误信息
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found。
这里的“xcb“文件全称是libqxcb.so,即如果提示类似的扩展(plugin)错误,实际出问题的文件是libq+错误提示+.so(so类似dll文件)
5、这个文件,默认安装位置如下:
文件-主目录-QT-6.6.1-gcc_64-plugins-platforms-libqxcb.so
6、这个文件可能缺少依赖项,在终端输入以下命令查看依赖信息
7、ldd(小写)+空格+把文件拖到终端里面就会自动填充名称,回车查看
8、以下是我遇到的错误信息
Libxcb-cursor.so.0=>File not found (缺失这个文件导致上一个打不开)9、然后在终端安装这个缺失的文件(或者下载文件自己安装)
sudo apt install libxcb-cursor0 【根据自己缺少的文件安装】
10、再重新打开QT,可以正常打开了。
注意点,linux指令还有路径,区分大小写,文件按实际安装位置查找。
Linux服务安装错误解决办法

各位同学们,总结学习Linux的经验,遇到的错误一般有4种原因:①未安装所需要的包②路径或用户错了(用户权限不够)③删除安装的文件夹,重新解压(可能解压不成功)④配置运行的语句错误以下为几个常见的错误:1. Error when bootstrapping CMake:Cannot find appropriate C++ compiler on this system.该错误原因是C++未安装成功解决办法:yum –y install gcc-c++注:-y为无需询问,直接安装。
确认安装的意思。
2.Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readline.cmake:83 (MESSAGE):Curses library not found. Please install appropriate package该问题原因:未安装成功ncurses-devel)解决办法:yum –y install ncurses-devel3. configure: error: xml2-config not found. Please check your libxml2 installation.解决办法:安装libxml2-devel以上包未安装的错误信息均有提示,建议查看提示的原因,安装相应的包。
最好在一开始就执行:1、移除系统自带的rpm包的http mysqlphpyum remove httpdmysqlmysql-server phpphp-cli php-common php-develphp-gd -y 2.安装编译环境及依赖库文件yum -y install ntp vim-enhanced gccgcc-c++ flex bison autoconfautomake bzip2-devel \ ncurses-develzlib-devellibjpeg-devellibpng-devellibtiff-develfreetype-devellibXpm-devel \ gettext-devel pam-devellibtoollibtool-ltdlopensslopenssl-develfontconfig-devel \libxml2-devel curl-devellibiculibicu-devellibmcryptlibmcrypt-devellibmhash libxml2 \ libmhash-develmysql-devellibxsltlibxslt-devellibtoollibtool-ltdl-devel找不到头部文件的错误:解决办法:./configure --prefix=/usr/local/php \--with-apxs2=/usr/local/apache/bin/apxs \--enable-cgi --with-mysql=/usr/local/mysql \--with-config-file-path=/usr/local/php/etc \--with-pdo-mysql=/usr/local/mysql/ \--with-mysqli=/usr/local/mysql/bin/mysql_config \--enable-zip --enable-sqlite-utf8 --enable-sockets \--enable-soap --enable-pcntl --enable-mbstring \--enable-calendar --enable-bcmath \--with-iconv=/usr/local/libiconv/ \--enable-exif --with-mcrypt --with-mhash --with-gd \--with-png-dir --with-jpeg-dir --with-freetype-dir \--with-libxml-dir --with-curl --with-curlwrappers \--with-zlib --with-openssl --with-kerberos=shared \--with-gettext=shared --with-xmlrpc=shared --with-xsl \4.Memcache服务端Cd /home/admin-------装了Memcache的服务端还不行,还要安装PHP 支持memcache的扩展模块view sourcetar -zxvf memcache-2.2.6.tgzcd memcache-2.2.6-------配置并安装/usr/local/php/bin/phpize //第一次可能找不到Cannot find config.m4./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dirmakemake install-------安装完后会有类似这样的提示:*****Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/tar -zxvf libevent-2.0.13-stable.tar.gzcd libevent-2.0.13-stable配置并安装./configure --prefix=/usr/local/libeventmakemake installln -s /usr/local/libevent/lib/libevent-2.0.so.5 /lib/ //创建库的软连接-------安装memcached-------进入安装的路径tar -zxvf memcached-1.4.7.tar.gzcd memcached-1.4.7-----5 配置并安装./configure --with-libevent=/usr/local/libeventmakemakeinstall---------切换到admin用户,不在root下面执行/usr/local/bin/memcached -d -m 2000 -P /tmp/memcached.pid本篇文章来源于Linux公社网站() 原文链接:/Linux/2007-12/9912p2.htm-------添加到开机启动:echo "/usr/local/bin/memcached -d -m 20000 -u root -P /tmp/memcached.pid " >> /etc/rc.localnetstat -tnlp |grepmemcached-d选项是启动一个守护进程,-m是分配给Memcache使用的内存数量,单位是MB,我这里是10MB,-u是运行Memcache的用户,我这里是root,-l是监听的服务器IP地址,如果有多个地址的话,我这里指定了服务器的IP地址192.168.0.222,-p是设置Memcache监听的端口,我这里设置了12000,最好是1024以上的端口,-c选项是最大运行的并发连接数,默认是1024,我这里设置了256,按照你服务器的负载量来设定,-P是设置保存Memcache的pid文件,我这里是保存在/tmp/memcached.pid。
内核编译错误解答(elf_i386错误)

内核编译错误解答(elf_i386错误)在编译内核过程中遇到的问题及解决方法:1.root@org:/usr/src/linux# make menuconfig*** Unable to find the ncurses libraries or the*** required header files.*** 'make menuconfig' requires the ncurses libraries.****** Install ncurses (ncurses-devel) and try again.***make[1]: *** [scripts/kconfig/dochecklxdialog] 错误1make: *** [menuconfig] 错误2解决方法:根据网上资料的提示进行如下的安装过程:1.sudo apt-get install ncurses如果安装失败,软件包ncurses还没有可供安装的候选者.就先安装libncurses*2.sudo apt-get install libncurses*问题2.make bzImage或make或make modules提示如下错误(这个错误不是每个人都会遇到的,可以用gcc--help查看你的gcc版本,如果你的版本是4.6或者4.6之后的应该会有下面的问题,如果比4.6的早就不会出现这个问题):gcc: 错误:elf_i386:没有那个文件或目录make[2]: *** [arch/x86/vdso/vdso32-int80.so.dbg] 错误1make[1]: *** [arch/x86/vdso] 错误2make: *** [arch/x86] 错误2解决方法:这个问题是由于gcc 4.6 不再支持linker-style 架构。
将arch/x86/vdso/Makefile 中,以VDSO_LDFLAGS_vdso.lds 开头所在行的"-m elf_x86_64" 替换为"-m64"。
初学者必读Linux开发常见错误及解决方法

初学者必读Linux开发常见错误及解决方法在Linux开发的旅程中,初学者常常会遭遇各种错误和挑战。
本文将介绍一些常见的Linux开发错误,并提供解决方法,帮助初学者顺利解决问题。
一、缺少依赖项在Linux开发中,缺少依赖项是一个常见的错误。
当编译或执行代码时,经常会出现找不到某个库或者头文件的情况。
解决该问题可以通过以下方法:1. 安装缺少的依赖项:使用包管理器(如apt、yum等)安装缺少的软件包。
2. 检查环境变量:确保你的环境变量(如PATH、LD_LIBRARY_PATH等)正确设置,以便系统可以找到所需的库和头文件。
二、权限问题在Linux系统中,权限是非常重要的。
如果你以低权限用户身份运行代码或进行某些操作,可能会遇到权限不足的错误。
为了解决权限问题,你可以考虑以下方法:1. 使用sudo命令:在需要提升权限的命令前加上sudo,输入管理员密码,以获得足够的权限。
2. 更改文件或目录的权限:通过chmod命令来更改文件或目录的权限,使你能够执行需要的操作。
三、编译错误在编译代码时,经常会遇到语法错误、未声明的变量或函数等问题。
编译错误可以通过以下方法解决:1. 仔细检查代码:仔细检查代码中的语法错误、拼写错误等问题。
使用合适的集成开发环境(IDE)或文本编辑器,可以有效地帮助你发现这些错误。
2. 错误信息定位:查看编译器输出的错误信息,定位到具体的错误行数和文件位置,有助于你快速解决问题。
四、运行时错误编译成功后,运行代码时可能会遇到各种错误,例如段错误、内存溢出等。
以下是解决运行时错误的方法:1. 使用调试工具:使用像gdb这样的调试工具,可以帮助你定位运行时错误的具体原因和位置。
2. 内存管理:学习和使用合适的内存管理技术,例如动态内存分配和析构函数,以避免内存泄漏和悬空指针问题。
五、网络连接问题在进行网络编程时,经常会遇到网络连接问题,如连接超时、无法连接等。
以下是解决网络连接问题的方法:1. 检查网络配置:确保你的网络配置正确,包括IP地址、端口号、网络协议等。
linux编译安装时常见错误解决办法

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安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)

Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)rpm安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)提⽰:error: Failed dependencies:cloog-ppl >= 0.15 is needed by gcc-4.4.7-4.el6.x86_64cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64rpm安装cloog-ppl会报:error: Failed dependencies:libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64rpm安装cpp会报:error: Failed dependencies:libmpfr.so.1()(64bit) is needed by cpp-4.4.7-4.el6.x86_64安装软件包前期准备⼯作:1.挂载光盘镜像到mnt⽬录下。
(学习推荐),下⾯说说挂载命令[root@localhost ~]# mount /dev/cdrom /mnt/[root@localhost Packages]#挂载成功后,进⼊到包所在⽬录[root@localhost ~]# cd /mnt/Packages/[root@localhost Packages]#2.⽹上去下载需要安装的包。
在安装gcc时我们基本都会碰到这样的错误提⽰:1》安装gcc包,并报错了:[root@localhost Packages]# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpmwarning: gcc-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEYerror: Failed dependencies:cloog-ppl >= 0.15 is needed by gcc-4.4.7-4.el6.x86_64cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64[root@localhost Packages]#上⾯的报错说明:缺少两个依赖关系包(cloog-ppl和cpp),那么我们只需要安装这两个包就⾏了。
linuxundefined reference to `pthread_create'

linuxundefined reference to `pthread_create' 在Linux系统中,当我们在编写多线程程序时,有时会遇到类似于"undefined reference to `pthread_create'"的错误信息。
这个错误信息意味着什么?为什么会出现这个错误?该如何解决?解答:1. 问题的含义:当我们编译并链接一个多线程程序时,会使用到Linux系统提供的线程库(pthread),其中包含了一些函数,如pthread_create(),用于创建新线程。
然而,当编译器在链接阶段找不到这些函数的定义时,就会抛出"undefined reference to `pthread_create'"错误。
2. 错误原因:这个错误通常是由于编译器的链接选项没有正确地包含pthread库,导致编译器无法找到pthread_create()等函数的定义。
这可能是因为编译命令中缺少了必要的参数,或者链接时未正确指定pthread库。
3. 解决方法:下面是一些解决"undefined reference to `pthread_create'"错误的常用方法:3.1 修改编译命令:在编译命令中添加-lpthread选项,以告诉编译器在链接时包含pthread 库。
例如,如果你使用gcc编译器,可以修改编译命令如下:gcc -o program program.c -lpthread-lpthread选项会告诉编译器在链接阶段将pthread库包含进来,以解决undefined reference错误。
3.2 调整链接顺序:有些编译器(如gcc)对于链接顺序是敏感的,需要将-lpthread选项放在编译源文件的后面。
例如:gcc -o program program.c -lm -lpthread这样,编译器会先处理源文件,然后再按照指定的链接顺序链接库。
解决.configure,make,makeinstall的报错

解决.configure,make,makeinstall的报错Linux下从源代码下编译安装一个软件有时候会报错,遇到一些麻烦。
有些情况即使你用了很多方法去尝试解决,但问题依然存在,那怎么办呢?本教程教你怎么解决Linux软件编译时遇到的问题注意:编译安装一个软件不会被系统的包管理系统记录信息,这对于卸载和记录软件的行为都是不利的,建议您尽量使用打包好的包(.rpm .deb)我们分3类错:./configure 错误make 错误make install 错误识别这些错误应该是很简单的:./configure的错误会被configure脚本输出,make和make install错误也应该很明显被识别。
下面分类说明3种错误和解决办法:一: ./configure 错误以下根据错误出现频率一一道来。
第一个是经常性出现错误(是选择性的)。
()中表示可选,OR表示有一致的解决办法,<>表示内的文字由具体情况具体表示1 。
(configure:) (error:) ( (or higher)) not found. (Please check your installation!) OR checking for ... (configure:) (error:) not found. OR (configure:) (error:) ( (or newer)) is required to build <package-you're-trying-to-compile>这表明的包的-dev或者-devel版本没有安装。
请使用你发行版的包管理器(或者其他寻找和安装包的方法)来寻找包并且安装,如果可能的话安装-dev 或者-devel版本如果-dev 或者-devel版本已经安装了,或者不存在,查看一下已经安装的版本号。
它足够高吗?是不是比要低,这样你要常识升级这些包。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
5.Configure: error: libjpeg.(a|so) not found
# yum install libjpeg libjpeg-devel
6.Configure: error: libpng.(also) not found.
# yum install libpng libpng-devel
13.Configure: error: Cannot find ldap.h
# yum install openldap-devel
本篇文章来源于 Linux公社网站() 原文链接:/Linux/2011-04/34622.htm
再php:~/:./configure …… --with-gd=/usr/local/gd2 ……
1) Configure: error: xml2-config not found. Please check your libxml2 installation.
Solutions :
Solutions :
Quote: # yum install unixODBC-devel
12) Configure: error: Cannot find pspell
Solutions :
Quote: # yum install pspell-devel
13) configure: error: mcrypt.h not found. Please reinstall libmcrypt.
7) Configure: error: freetype.h not found.
Solutions :
Quote: #yum install freetype-devel
8) Configure: error: Unable to locate gmp.h
Solutions :
7.Configure: error: freetype.h not found.
#yum install freetype-devel
8.Configure: error: Unable to locate gmp.h
# yum install gmp-devel
9.Configure: error: Please reinstall the ncurses distribution
Solutions :
Quote:# yum install net-snmp net-snmp-devel
CentOS 5 常见的configure error的解决方法仅限于CentOS 5
configure: error: No curses/termcap library found
apt-get install libpng12-dev
configure: error: cannot find output from lex; giving up
yum -y install flex
configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
Solutions :
Quote: # yum install curl curl-devel (For Redhat & Fedora)
# install libcurl4-gnutls-dev (For Ubuntu)
5) Configure: error: libjpeg.(also) not found.
Solutions :
Quote: # yum install ncurses ncurses-devel
11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
configure: error: xml2-config not found
yum -y install libxml2-devel
debian:apt-get install libxml2-dev
configure: error: Cannot find OpenSSL's
yum -y install openssl-devel
网上有的说法是:
--with-named-curses-libs=/usr/lib/libncursesw.so.5
其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是
yum -y install ncurses-devel
debian: apt-get install libncurses5-dev
apt-get install libfreetype6-dev
configure: error: ...No recognized SSL/TLS toolkit detected
apt-get install libssl-dev
2010-10-30 12:01 linux下apache+php安装常见问题 configure: error: Unable to find libgd.(a|so)
如果使用的是ubuntu或debian就很简单了,直接sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd 就基本上搞定,但是用源代码安装还是很麻烦~
Quote: #yum install libxml2 libxml2-devel (For Redhat & Fedora)
# aptitude install lib xml2 -dev (For ubuntu)
2) Checking for pkg-config… /usr/bin/pkg-config
# yum install ncurses ncurses-devel
10.Configure: error: Cannot find pspell
# yum install pspell-devel
11.Configure: error: mcrypt.h not found. Please reinstall libmcrypt.
# yum install libmcrypt libmcrypt-devel
12.Configure: error: snmp.h not found. Check your SNMP installation.
# yum install net-snmp net-snmp-devel
configure: error: Cannot find OpenSSL’s <evp.h>
Solutions :
Quote: #yum install openssl openssl-devel
3) Configure: error: Please reinstall the BZip2 distribution
configure: error: libjpeg.(a|so) not found
yum -y install gd
yum -y install gd-devel
debian:apt-get install libjpeg-dev
configure: error: libpng.(a|so) not found.
#yum install libxml2 libxml2-devel
2.configure: error: Cannot find OpenSSL’s <evp.h>
#yum install openssl openssl-devel
3.Configure: error: Please reinstall the BZip2 distribution
yum -y install zlib-devel openssl-devel
debian:apt-get install zlib1g-dev
configure: error: libXpm.(a|so) not found.
apt-get install libxpm-dev
onfigure: error: freetype.h not found.
wget /gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11.tar.gz
cd gd-2.0.11
sudo ./configure --prefix=/usr/local/gd2
sudo make
sudo make install
Solutions :
Quote: # yum install bzip2 bzip2-devel
4) Configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
# yum install bzip2 bzip2-devel
4.Configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/
# yum install curl curl-devel