Linux常见问题汇总

Linux问题:
ifconfig查看IP地下载报错:bashifconfigcommandnotfound
解决方法:
先执行 export PATH="$PATH:/sbin" 然后就可以了
 
安装apache的问题:
初次接触PHP环境,自己手动配置apache与php,遇到httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.xx for ServerName这个问题
解决方法:
vi /etc/httpd/conf/httpd.conf 将里面的 #ServerName localhost:80 注释去掉即可。
 
安装PHP的问题:

configure:error:cannot find output from lex,give up,此错误是说 缺少flex.rpm,从linux 6.0光盘中找到flex-2.5.4a-29.i386.rpm

解决方法:
在/media/RHEL_5.5 i386 DVD/Server中rpm -ivh flex-2.5.4a-29.i386.rpm
 
configure: error: xml2-config not found. Please check your libxml2 installation.
 
错误原因,xml2-config这个文件没找到。

/*原因可能出在我这次安装redhat,有很多东西没选上,所以出此问题。*/
根据错误提示,安装libxml2。RHEL_5.2的安装光盘上提供了很多rpm包,我的是dvd光盘,位置在/media/RHEL_5.2 i386 DVD/Server,
cd /media/RHEL_5.2 i386 DVD/Server
ls *libxml*

[root@localhost Server]# ls *libxml*
libxml2-2.6.26-2.1.2.1.i386.rpm        libxml2-python-2.6.26-2.1.2.1.i386.rpm
libxml2-devel-2.6.26-2.1.2.1.i386.rpm  perl-libxml-perl-0.08-1.2.1.noarch.rpm
[root@localhost Server]# rpm -ivh libxml2-python-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-python-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
        package libxml2-python-2.6.26-2.1.2.1 is already installed  /*提示我已经安装过了*/
[root@localhost Server]# rpm -ivh libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        zlib-devel is needed by libxml2-devel-2.6.26-2.1.2.1.i386
[root@localhost Server]# ls *zlib-devel*
zlib-devel-1.2.3-3.i386.rpm
[root@localhost Server]# rpm -ivh zlib-devel-1.2.3-3.i386.rpm
warning: zlib-devel-1.2.3-3.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:zlib-devel             ########################################### [100%]
[root@localhost Server]# rpm -ivh libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libxml2-devel          ########################################### [100%]
[root@localhost Server]#

好了,没有问题了

上一篇:在AndroidStudio中使用单元测试


下一篇:前端基本知识(三):JS的闭包理解(第一个思考题有错误,已修改)