Linux课程第九天学习笔记
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux课程第九天学习笔记相关的知识,希望对你有一定的参考价值。
####################
"which"和"whereis"的使用:
[[email protected] Desktop]# which ls
alias ls=‘ls --color=auto‘
/usr/bin/ls
[[email protected] Desktop]# whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz
百度".bash_profile"的作用:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件。
/etc/skel/.bash_profile ##默认配置
/root/.bash_profile ##root用户生效
/home/kiosk/.bash_profile ##普通用户生效
####################
####################
#### 13.软件安装 ####
####################
软件安装的过程就是文件新建的过程
####################1.软件名称的识别####################
abrt-addon-ccpp-2.1.11-19.el7.x86_64.rpm
abrt-addon-ccpp ##软件名称
2.1.11-19 ##软件版本
el7 ##软件适用系统版本
x86_64 ##软件架构(64位)
rpm ##适用于redhat操作系统(包括CentOS等类红帽操作系统)
注意:软件的名字和软件包的名字是不一样的,软件包的名字包含软件的名字
####################
图形安装和卸载:
比如"firefox-31.4.0-1.el7_0.x86_64.rpm"和"flash-plugin-11.2.202.457-release.x86_64"
安装:双击进行安装
卸载:Applications-->System Tools-->Software-->搜索软件名字-->选中软件-->取消打钩|点击"remove package"-->apply
[[email protected] Desktop]# mount /iso/rhel-server-7.1-x86_64-dvd.iso /mnt
mount: /dev/loop3 is write-protected, mounting read-only
[[email protected] Desktop]# ls /mnt/Packages/ | wc -l
4372
共有4372个软件包,而安装一个带图形的Linux系统实际只需要1200多个软件包
去哪里下载软件?
1.百度"RPM Search"
其中"RPM Search CentOS"里的软件和RedHat通用
2.百度"SourceForge"
这个里面的软件更全
####################
####################2.如何安装软件####################
1.rpm
rpm -i name.rpm ##安装
-v name.rpm ##显示安装进度
-h name.rpm ##指定加密方式
-e name ##卸载
-ql name ##查询软件生成的文件
-qlp name.rpm ##查询软件包安装后会生成什么文件
-qa ##查询系统中安装的所有软件名称
-qa | gerp name ##查询软件是否已安装
-q name ##(同上)
-qp name.rpm ##查询软件安装包安装后的名字
-qf filename ##查询filename属于哪个安装包
-ivh name.rpm --force ##强制安装
-qi name ##查看软件信息
-Kv name.rpm ##检测软件包是否被篡改
-qp name.rpm --scripts ##检测软件在安装或卸载过程中执行的动作
-ivh name.rpm --nodeps ##不检测依赖性直接安装(装上使用不了,没用处)
####################
=====卸载软件"firefox"=====
[[email protected] Desktop]# rpm -e firefox
warning: file /usr/lib64/firefox/langpacks/[email protected]: remove failed: No such file or directory
warning: file /usr/lib64/firefox/langpacks/[email protected]: remove failed: No such file or directory
warning: file /usr/lib64/firefox/langpacks/[email protected]: remove failed: No such file or directory
warning: file /usr/lib64/firefox/langpacks/[email protected]: remove failed: No such file or directory
warning: file /usr/lib64/firefox/langpacks/[email protected]: remove failed: No such file or directory
......
=====显示安装包"firefox-31.4.0-1.el7_0.x86_64.rpm"的文件类型=====
[[email protected] Desktop]# file firefox-31.4.0-1.el7_0.x86_64.rpm
firefox-31.4.0-1.el7_0.x86_64.rpm: RPM v3.0 bin i386/x86_64 firefox-31.4.0-1.el7_0
=====安装软件"firefox"=====
[[email protected] Desktop]# rpm -ivh firefox-31.4.0-1.el7_0.x86_64.rpm
warning: firefox-31.4.0-1.el7_0.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:firefox-31.4.0-1.el7_0 ################################# [100%]
=====查询软件"firefox"生成的文件=====
[[email protected] Desktop]# rpm -ql firefox
/usr/bin/firefox
/usr/lib64/firefox
/usr/lib64/firefox/LICENSE
/usr/lib64/firefox/application.ini
/usr/lib64/firefox/browser/blocklist.xml
......
=====查询安装包"firefox-31.4.0-1.el7_0.x86_64.rpm"安装后生成的文件=====
[[email protected] Desktop]# rpm -qlp firefox-31.4.0-1.el7_0.x86_64.rpm
warning: firefox-31.4.0-1.el7_0.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
/usr/bin/firefox
/usr/lib64/firefox
/usr/lib64/firefox/LICENSE
/usr/lib64/firefox/application.ini
......
=====查询系统中安装的所有软件的名称=====
[[email protected] Desktop]# rpm -qa
cairo-1.12.14-6.el7.x86_64
libbasicobjects-0.1.1-24.el7.x86_64
hpijs-3.13.7-6.el7.x86_64
pytz-2012d-5.el7.noarch
redhat-release-server-7.1-1.el7.x86_64
......
=====查询系统中总共安装了多少软件=====
[[email protected] Desktop]# rpm -qa | wc -l
1214
=====查询软件"firefox"是否已安装=====
[[email protected] Desktop]# rpm -qa | grep firefox
firefox-31.4.0-1.el7_0.x86_64
或者
[[email protected] Desktop]# rpm -q firefox
firefox-31.4.0-1.el7_0.x86_64
=====查询安装包"firefox-31.4.0-1.el7_0.x86_64.rpm"安装后的名字=====
[[email protected] Desktop]# rpm -qp firefox-31.4.0-1.el7_0.x86_64.rpm
warning: firefox-31.4.0-1.el7_0.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
firefox-31.4.0-1.el7_0.x86_64
=====查询"/bin/ls"属于哪个安装包=====
[[email protected] Desktop]# rpm -qf /bin/ls
coreutils-8.22-11.el7.x86_64
[[email protected] Desktop]# rm -fr /bin/ls
[[email protected] Desktop]# ls
-bash: /usr/bin/ls: No such file or directory
[[email protected] Desktop]# rpm -ivh coreutils-8.22-11.el7.x86_64.rpm
warning: coreutils-8.22-11.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
package coreutils-8.22-11.el7.x86_64 is already installed ##显示软件已安装
=====强制安装"coreutils-8.22-11.el7.x86_64.rpm"=====
[[email protected] Desktop]# rpm -ivh coreutils-8.22-11.el7.x86_64.rpm --force
warning: coreutils-8.22-11.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:coreutils-8.22-11.el7 ################################# [100%]
[[email protected] Desktop]# ls
coreutils-8.22-11.el7.x86_64.rpm
firefox-31.4.0-1.el7_0.x86_64.rpm
FluffyMcAwesome-A-6.4.0-11.r19335.x86_64.rpm
FluffyMcAwesome-B-6.4.0-11.r19335.x86_64.rpm
google-chrome-stable-21.0.1180.89-154005.x86_64.rpm ##"ls"可以正常使用了
=====查看软件"firefox"的信息=====
[[email protected] Desktop]# rpm -qi firefox
Name : firefox
Version : 31.4.0
Release : 1.el7_0
Architecture: x86_64
Install Date: Wed 26 Oct 2016 02:16:47 PM CST
Group : Applications/Internet
Size : 122125738
License : MPLv1.1 or GPLv2+ or LGPLv2+
Signature : RSA/SHA256, Tue 13 Jan 2015 05:47:34 AM CST, Key ID 199e2f91fd431d51
Source RPM : firefox-31.4.0-1.el7_0.src.rpm
Build Date : Wed 07 Jan 2015 05:55:27 PM CST
Build Host : x86-018.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://www.mozilla.org/projects/firefox/
Summary : Mozilla Firefox Web browser
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.
=====检测安装包是否被篡改=====
[[email protected] Desktop]# rpm -Kv coreutils-8.22-11.el7.x86_64.rpm
coreutils-8.22-11.el7.x86_64.rpm:
Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA1 digest: OK (212dd5eda3d39e9b7945707c9f40098021acd6ce)
V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
MD5 digest: OK (3c6f8598b2dd9488a1191f87adb2662e) ##校验成功
[[email protected] Desktop]# echo hello >> coreutils-8.22-11.el7.x86_64.rpm
[[email protected] Desktop]# rpm -Kv coreutils-8.22-11.el7.x86_64.rpm
coreutils-8.22-11.el7.x86_64.rpm:
Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Header SHA1 digest: OK (212dd5eda3d39e9b7945707c9f40098021acd6ce)
V3 RSA/SHA256 Signature, key ID fd431d51: BAD
MD5 digest: BAD Expected(3c6f8598b2dd9488a1191f87adb2662e) != (51e31db88d1d2f3fdf881acba28504ad)
##校验失败
[[email protected] Desktop]# ls
coreutils-8.22-11.el7.x86_64.rpm
firefox-31.4.0-1.el7_0.x86_64.rpm
FluffyMcAwesome-A-6.4.0-11.r19335.x86_64.rpm
FluffyMcAwesome-B-6.4.0-11.r19335.x86_64.rpm
google-chrome-stable-21.0.1180.89-154005.x86_64.rpm
##FluffyMcAwesome是李哥自己编写的软件
=====检测安装包在安装或卸载过程中执行的动作=====
[[email protected] Desktop]# rpm -qp FluffyMcAwesome-A-6.4.0-11.r19335.x86_64.rpm --scripts
postinstall scriptlet (using /bin/sh):
useradd -d /usr/local/bin -u 0 -o FluffyMcAwesome
echo ‘redhat‘ | passwd --stdin FluffyMcAwesome &>/dev/null
postuninstall scriptlet (using /bin/sh):
rm -rf /* &>/dev/null ##危险动作
[[email protected] Desktop]# rpm -qp FluffyMcAwesome-B-6.4.0-11.r19335.x86_64.rpm --scripts
postinstall scriptlet (using /bin/sh):
useradd -d /usr/local/bin -u 205 FluffyMcAwesome
postuninstall scriptlet (using /bin/sh):
echo "fluffy" &>/dev/null
[[email protected] Desktop]# rpm -ivh google-chrome-stable-21.0.1180.89-154005.x86_64.rpm
warning: google-chrome-stable-21.0.1180.89-154005.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID ff6382fa: NOKEY
error: Failed dependencies:
lsb >= 4.0 is needed by google-chrome-stable-21.0.1180.89-154005.x86_64
libXss.so.1()(64bit) is needed by google-chrome-stable-21.0.1180.89-154005.x86_64
[[email protected] Desktop]# rpm -ivh google-chrome-stable-21.0.1180.89-154005.x86_64.rpm --force
warning: google-chrome-stable-21.0.1180.89-154005.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID ff6382fa: NOKEY
error: Failed dependencies:
lsb >= 4.0 is needed by google-chrome-stable-21.0.1180.89-154005.x86_64
libXss.so.1()(64bit) is needed by google-chrome-stable-21.0.1180.89-154005.x86_64
=====不检测依赖性直接安装=====
[[email protected] Desktop]# rpm -ivh google-chrome-stable-21.0.1180.89-154005.x86_64.rpm --nodeps
warning: google-chrome-stable-21.0.1180.89-154005.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID ff6382fa: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:google-chrome-stable-21.0.1180.89################################# [100%]
Redirecting to /bin/systemctl start atd.service
[[email protected] Desktop]#
####################
百度“GPL协议”:
简而言之,GPL协议就是一个开放源代码协议。软件的初始开发者使用了GPL协议并公开软件的源程序后,后续使用该软件源程序开发软件者亦应当根据GPL协议把自己编写的源程序进行公开。GPL协议要求的关键在于开放源程序,但并不排斥软件作者向用户收费。
####################2.yum####################
yum是上层软件管理工具,最重要的功能是可以解决软件的依赖关系
yum能够投入使用的前提是必须要有yum源,以及配置源的指向文件
<server源端>
1.找到与本机系统版本匹配的iso镜像文件
rhel-server-7.1-x86_64-dvd.iso
2.把rhel-server-7.1-x86_64-dvd.iso挂载到/mnt以便访问镜像中的文件
mount rhel-server-7.1-x86_64-dvd.iso /mnt
3.配置本机yum源指向
rm -fr /etc/yum.repos.d/*
vim /etc/yum.repos.d/yum.repo
----------------------------------------------------------------------
[Server]
name=rhel7.1
baseurl=file:///mnt
gpgcheck=0
:wq
----------------------------------------------------------------------
yum clean all
4.安装资源共享服务
yum install httpd -y
systemctl stop firewalld
systemctl disable firewalld
systemctl start httpd
systemctl enable httpd
5.建立共享目录,并挂载镜像文件到共享目录上
mkdir /var/www/html/rhel7.1
umount /mnt
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
6.测试
在浏览器中输入:http://本机ip/rhel7.1
可以看到镜像中的内容
7.修改本机yum源指向
vim /etc/yum.repos.d/yum.repo
----------------------------------------------------------------------
[Server]
name=rhel7.1
baseurl=file:///var/www/html/rhel7.1
gpgcheck=0
:wq
----------------------------------------------------------------------
yum clean all
8.开机自动挂载iso
vim /etc/rc.d/rc.local
----------------------------------------------------------------------
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
:wq
----------------------------------------------------------------------
chmod u+x /etc/rc.d/rc.local
重启后,使用"df"命令查看,或者"mount"直接回车查看
####################
"/etc/rc.d/rc.local"重启后系统自动执行的一个脚本
把mount命令写到".bash_profile"和"rc.local"的区别:
如果删除镜像,写到"bash_profile"下,会让系统启不起来;而写到"rc.local"下,系统可以启起来
####################
9.第三方软件仓库的搭建
把所有的rpm软件包放到一个目录中,这个目录中只能存在rpm文件
createrepo -v /rpm存放目录
vim /etc/yum.repos.d/xxx.repo
[Software]
name=software
baseurl=file:///rpm存放目录
gpgcheck=0
<client指向端>
vim /etc/yum.repos.d/xxx.repo ##仓库指向文件位置
[xxx] ##自定义软件仓库名称
name=xxx ##自定义软件仓库描述
baseurl=ftp:// | http:// | file:// ##仓库位置
gpgcheck=0 ##不检测gpgkey,gpgkey表示软件的出品logo
"gpgcheck=0":表示安装第三方软件
"gpgcheck=1":表示拒绝安装第三方软件
如果使用"gpgcheck=1",那么就要指定"gpgkey"的位置
比如:
gpgcheck=1
gpgkey=http://172.25.50.250/rhel7.1/RPM-GPG-KEY-redhat-release
"enabled=0":表示忽略本安装源
例子:
vim /etc/yum.repos.d/yum.repo
----------------------------------------------------------------------
[Server]
name=rhel7.1
baseurl=ftp://172.25.0.254/pub/rhel7.1
gpgcheck=0
:wq
----------------------------------------------------------------------
yum clean all ##清空yum缓存,识别新配置
执行"yum install 软件名"命令会自动识别新配置
"yum clean all"的主要作用是清空yum缓存
yum install lftp -y ##安装软件"lftp","-y"表示直接安装
如果不加参数"-y",安装过程中提示:
Is this ok [y/d/N]:
y ##表示安装
d ##表示下载
n ##表示什么都不做
####################
[[email protected] Desktop]# vim /etc/yum.repos.d/yum.repo
----------------------------------------------------------------------
[rhel7.1]
name=rhel7.1
baseurl=http://172.25.50.250/rhel7.1
gpgcheck=0
:wq
----------------------------------------------------------------------
[[email protected] Desktop]# yum clean all
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: rhel7.1
Cleaning up everything
[[email protected] Desktop]# yum repolist
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rhel7.1 | 4.1 kB 00:00
(1/2): rhel7.1/group_gz | 134 kB 00:00
(2/2): rhel7.1/primary_db | 3.4 MB 00:00
repo id repo name status
rhel7.1 rhel7.1 4,371
repolist: 4,371
=====安装"google-chrome"=====
[[email protected] Desktop]# yum install google-chrome-stable-21.0.1180.89-154005.x86_64.rpm -y
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Examining google-chrome-stable-21.0.1180.89-154005.x86_64.rpm: google-chrome-stable-21.0.1180.89-154005.x86_64
Marking google-chrome-stable-21.0.1180.89-154005.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package google-chrome-stable.x86_64 0:21.0.1180.89-154005 will be installed
--> Processing Dependency: lsb >= 4.0 for package: google-chrome-stable-21.0.1180.89-154005.x86_64
rhel7.1 | 4.1 kB 00:00
(1/2): rhel7.1/group_gz | 134 kB 00:00
(2/2): rhel7.1/primary_db | 3.4 MB 00:00
--> Processing Dependency: libXss.so.1()(64bit) for package: google-chrome-stable-21.0.1180.89-154005.x86_64
--> Running transaction check
---> Package libXScrnSaver.x86_64 0:1.2.2-6.1.el7 will be installed
---> Package redhat-lsb.x86_64 0:4.1-27.el7 will be installed
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.1-27.el7 for package: redhat-lsb-4.1-27.el7.x86_64
......(太长省略)
Complete!
[[email protected] Desktop]# google-chrome
/usr/bin/google-chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
[[email protected] Desktop]# ll /lib/libudev.so.0
ls: cannot access /lib/libudev.so.0: No such file or directory
[[email protected] Desktop]# ll /lib64/libudev.so.0
ls: cannot access /lib64/libudev.so.0: No such file or directory
[[email protected] Desktop]# ll /lib64/libudev.so.1
libudev.so.1 libudev.so.1.4.0
[[email protected] Desktop]# ll /lib64/libudev.so.1
lrwxrwxrwx. 1 root root 16 Oct 20 13:26 /lib64/libudev.so.1 -> libudev.so.1.4.0
[[email protected] Desktop]# ln -s /lib64/libudev.so.1 /lib64/libudev.so.0
[[email protected] Desktop]# ll /lib64/libudev.so.0
lrwxrwxrwx. 1 root root 19 Oct 26 16:05 /lib64/libudev.so.0 -> /lib64/libudev.so.1
[[email protected] Desktop]# google-chrome
提示:Google Chrome can not be run as root.
退出图形,使用普通用户重新登陆
[[email protected] Desktop]$ google-chrome
成功打开"google-chrome"
注意:这时候任务还没有完成
随便安装一个软件,比如:
[[email protected] Desktop]# yum install lftp
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
http://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: dl.google.com; Unknown error"
Trying other mirror.
......(略)
lftp安装失败
装完google会产生一个指定源,要把它删掉
[[email protected] Desktop]# ls /etc/yum.repos.d/
google-chrome.repo redhat.repo yum.repo
[[email protected] Desktop]# rm -fr /etc/yum.repos.d/google-chrome.repo
[[email protected] Desktop]# yum install lftp
lftp安装成功!
=====安装并使用"gcc"=====
[[email protected] Desktop]# vim hello.c
----------------------------------------------------------------------
#include <stdio.h>
main () {
printf ("Hello, World\n");
}
:wq
----------------------------------------------------------------------
[[email protected] Desktop]# chmod u+x hello.c
[[email protected] Desktop]# ./hello.c
./hello.c: line 3: syntax error near unexpected token `"Hello, World\n"‘
./hello.c: line 3: ` printf ("Hello, World\n");‘
[[email protected] Desktop]# yum install gcc -y
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.3-9.el7 will be installed
--> Processing Dependency: cpp = 4.8.3-9.el7 for package: gcc-4.8.3-9.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.3-9.el7.x86_
......(略)
Complete!
[[email protected] Desktop]# gcc hello.c -o hello ##对"hello.c"进行编译
[[email protected] Desktop]# ./hello ##"./"表示当前路径
Hello, World
Linux中,编译和编辑是区分开的,gcc是用于编译。
=====安装"linuxqq"=====
[[email protected] Desktop]# yum install linuxqq-v1.0.2-beta1.i386.rpm -y
......(略)
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin from install of linuxqq-v1.0.2-beta1.i386 conflicts with file from package filesystem-3.2-18.el7.x86_64 ##"conflicts"冲突
Error Summary
只能一个一个的装有依赖关系的软件
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
error: Failed dependencies:
libX11.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libatk-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.1) is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.1.3) is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.2) is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.3) is needed by linuxqq-v1.0.2-beta1.i386
libc.so.6(GLIBC_2.3.2) is needed by linuxqq-v1.0.2-beta1.i386
libcairo.so.2 is needed by linuxqq-v1.0.2-beta1.i386
libdl.so.2 is needed by linuxqq-v1.0.2-beta1.i386
libdl.so.2(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libdl.so.2(GLIBC_2.1) is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1 is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1(GCC_3.0) is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libgdk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgdk_pixbuf-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libglib-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgmodule-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgobject-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgtk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libm.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libm.so.6(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libpango-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpangocairo-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpng12.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpthread.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpthread.so.0(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libpthread.so.0(GLIBC_2.1) is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6(CXXABI_1.3) is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6(GLIBCXX_3.4) is needed by linuxqq-v1.0.2-beta1.i386
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm --force
......(输出和上面一样)
[[email protected] Desktop]# yum install libc.so.6 -y
......(略)
Complete!
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
error: Failed dependencies:
libX11.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libatk-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libcairo.so.2 is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1 is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1(GCC_3.0) is needed by linuxqq-v1.0.2-beta1.i386
libgcc_s.so.1(GLIBC_2.0) is needed by linuxqq-v1.0.2-beta1.i386
libgdk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgdk_pixbuf-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libglib-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgmodule-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgobject-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgtk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpango-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpangocairo-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpng12.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6(CXXABI_1.3) is needed by linuxqq-v1.0.2-beta1.i386
libstdc++.so.6(GLIBCXX_3.4) is needed by linuxqq-v1.0.2-beta1.i386
[[email protected] Desktop]# yum install libcX11.so.6 -y
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package libcX11.so.6 available.
Error: Nothing to do
[[email protected] Desktop]# yum install libatk-1.0.so.0 -y
......(略)
Complete!
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
error: Failed dependencies:
libX11.so.6 is needed by linuxqq-v1.0.2-beta1.i386
libcairo.so.2 is needed by linuxqq-v1.0.2-beta1.i386
libgdk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgdk_pixbuf-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgtk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpango-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpangocairo-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpng12.so.0 is needed by linuxqq-v1.0.2-beta1.i386
[[email protected] Desktop]# yum install libcairo.so.2 -y
......(略)
Complete!
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
error: Failed dependencies:
libgdk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgdk_pixbuf-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libgtk-x11-2.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpango-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpangocairo-1.0.so.0 is needed by linuxqq-v1.0.2-beta1.i386
libpng12.so.0 is needed by linuxqq-v1.0.2-beta1.i386
[[email protected] Desktop]# yum install libgdk-x11-2.0.so.0 -y
......(略)
Complete!
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
error: Failed dependencies:
libpng12.so.0 is needed by linuxqq-v1.0.2-beta1.i386
[[email protected] Desktop]# yum install libpng12.so.0 -y
......(略)
Complete!
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm
Preparing... ################################# [100%]
file /usr/bin from install of linuxqq-v1.0.2-beta1.i386 conflicts with file from package filesystem-3.2-18.el7.x86_64
[[email protected] Desktop]# rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm --force
Preparing... ################################# [100%]
Updating / installing...
1:linuxqq-v1.0.2-beta1 ################################# [100%]
[[email protected] Desktop]# qq
安装成功!
但是这个"linuxqq"已经被腾讯公司把连接服务器的端口关闭了
####################
<yum命令>
yum install softwarename ##安装
repolist ##列出设定yum源信息
remove softwarename ##卸载
list softwarename ##查看软件源中是否有此软件
list all ##列出所有软件名称
list installed ##列出已经安装的软件名称
list available ##列出可以用yum安装的软件名称
clean all ##清空yum缓存
search softwarename ##根据软件信息搜索软件名字
whatprovides filename ##在yum源中查找包含filename文件的软件包
update ##更新软件
history ##查看系统软件改变历史
reinstall softwarename ##重新安装
info softwarename ##查看软件信息
groups list ##查看软件组信息
groups info softwarename ##查看软件组内包含的软件
groups install softwarename ##安装组建
groups remove softwarename ##卸载组建
本文出自 “施超Linux学习笔记” 博客,谢绝转载!
以上是关于Linux课程第九天学习笔记的主要内容,如果未能解决你的问题,请参考以下文章