七、软件管理
7.1 rpm 安装
7.1.1 挂载
[root@localhost ~]# ll /mnt
total 0
drwxr-xr-x. 2 root root 6 Oct 27 21:32 hgfs
[root@localhost ~]# mount /dev/sr0 /mnt #挂载
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@localhost ~]#
[root@localhost ~]# ll /mnt #挂载后再次查看,里面是 ISO 镜像的内容
total 44
drwxr-xr-x. 1 root root 2048 Oct 25 2023 AppStream
drwxr-xr-x. 1 root root 2048 Oct 25 2023 BaseOS
drwxrwxr-x. 1 root root 2048 Oct 25 2023 EFI
-r--r--r--. 1 root root 8154 Oct 25 2023 EULA
-r--r--r--. 1 root root 1455 Oct 25 2023 extra_files.json
-r--r--r--. 1 root root 18092 Oct 25 2023 GPL
drwxrwxr-x. 1 root root 2048 Oct 25 2023 images
drwxrwxr-x. 1 root root 2048 Oct 25 2023 isolinux
-r--r--r--. 1 root root 103 Oct 25 2023 media.repo
-r--r--r--. 1 root root 1669 Oct 25 2023 RPM-GPG-KEY-redhat-beta
-r--r--r--. 1 root root 3682 Oct 25 2023 RPM-GPG-KEY-redhat-release
AppStream、BaseOS:rpm包的所在目录,是 Red Hat 系列操作系统中的软件仓库分类
7.1.2创建/rpm目录,将/mnt下的仓库拷贝到/rpm下
#新建一个目录,将AppStream、BaseOS拷贝
[root@localhost ~]# mkdir /rpm
[root@localhost ~]# cp /mnt/AppStream/ /rpm/ -r
#拷贝需要时间,因此要新建一个xshell连接该虚拟机,将BaseOS也拷贝过来
[root@localhost ~]# cp /mnt/BaseOS/ /rpm/ -r
将AppStream、BaseOS作为仓库,供后面的DNF来使用
-r:告诉 cp 命令复制目录及其内容,包括所有子目录和文件
7.1.3 查看/rpm下的信息
[root@localhost ~]# ll /rpm #列出位于 /rpm 目录下的文件和子目录的详细信息。
total 0
drwxr-xr-x. 4 root root 38 Mar 15 11:40 AppStream
drwxr-xr-x. 4 root root 38 Mar 15 11:41 BaseOS
[root@localhost ~]# tree /rpm #以树状图的形式列出指定目录( /rpm)下的所有文件和子目录,以及它们的嵌套层次。
7.1.4 切换路径到/rpm/BaseOS/Packages/,查看后发现有大量的软件包
[root@localhost ~]# cd /rpm/BaseOS/
[root@localhost BaseOS]# ll #/rpm/BaseOS下有两个包Packages、repodata
total 92
drwxr-xr-x. 2 root root 61440 Mar 15 11:41 Packages
drwxr-xr-x. 2 root root 4096 Mar 15 11:41 repodata
[root@localhost BaseOS]# cd Packages/
[root@localhost Packages]# ll
total 1310536
-r--r--r--. 1 root root 84797 Mar 15 11:41 accel-config-3.5.3-2.el9.i686.rpm
-r--r--r--. 1 root root 81657 Mar 15 11:41 accel-config-3.5.3-2.el9.x86_64.rpm
-r--r--r--. 1 root root 54604 Mar 15 11:41 accel-config-libs-3.5.3-2.el9.i686.rpm
-r--r--r--. 1 root root 54176 Mar 15 11:41 accel-config-libs-3.5.3-2.el9.x86_64.rpm
7.1.5 如果我们要安装zsh-5.8-9.el9.x86_64.rpm包,则使用下面的命令
root@localhost Packages]# rpm -i zsh-5.8-9.el9.x86_64.rpm
#-i:这个选项表示你想要安装一个新的 RPM 包。它告诉 rpm 命令执行安装操作。
[root@localhost Packages]# rpm -qa | grep zsh
#查询系统中所有已安装的 RPM 包,并过滤出名称中包含 "zsh" 的包。
#-qa 中的 -q 表示查询模式,而 -a 则表示所有包。
7.1.6 删除该包
[root@localhost Packages]# rpm -e zsh
#-e:卸载
7.2 dnf 本地安装
7.2.1 切换路径到/etc/yum.repos.d/,清空仓库,为演示dnf安装做准备
[root@localhost Packages]# cd /etc/yum.repos.d/ #cd /etc/yum.repos.d/:这一步将当前工作目录更改到 /etc/yum.repos.d/,这是存放 YUM(Yellowdog Updater, Modified)仓库配置文件的目录。
[root@localhost yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 358 Nov 2 10:02 redhat.repo
-rw-r--r--. 1 root root 113 Nov 2 10:00 rpm.repo
[root@localhost yum.repos.d]# rm -rf *
[root@localhost yum.repos.d]# ll
total 0
[root@localhost yum.repos.d]# cd
[root@localhost ~]# dnf install http -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
#该错误表明 DNF/YUM 在尝试查找软件包进行安装时,未能找到任何已启用的软件仓库。这通常是因为 /etc/yum.repos.d/ 目录中没有任何有效的 .repo 文件,正如之前命令中所做的那样清空了该目录。
注意:要将/mnt下面的仓库拷贝到/rpm下面。
7.2.2 定义仓库bendi.repo,一般在/etc/yum.repos.d/目录下
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
total 4
-rw-r--r--. 1 root root 358 Mar 15 15:58 redhat.repo
[root@localhost yum.repos.d]# vim bendi.repo
[root@localhost yum.repos.d]# cat bendi.repo
[baseos]
name=baseos
baseurl=/rpm/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=/rpm/AppStream
gpgcheck=0
7.2.3 安装软件对仓库进行测试
[root@localhost ~]# dnf install httpd -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
baseos 133 MB/s | 2.0 MB 00:00
appstream 150 MB/s | 6.5 MB 00:00
Dependencies resolved.
============================================================================================
Package Architecture Version Repository Size
============================================================================================
Installing:
httpd x86_64 2.4.57-5.el9 appstream 52 k
#软件包名 架构信息 具体版本 从 appstream 仓库安装
7.3 dnf网络仓库安装
7.3.1 删除bendi.repo,为网络安装做准备
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 113 Mar 15 16:24 bendi.repo
-rw-r--r--. 1 root root 358 Mar 15 15:58 redhat.repo
[root@localhost yum.repos.d]# rm -rf bendi.repo
注意:前面还有步骤:7.1.1、7.1.2,然后将本地仓库换成下文中的网络仓库
7.3.2 编写网络仓库
[root@localhost yum.repos.d]# vim wangluo.repo
[root@localhost yum.repos.d]# cat wangluo.repo
[baseos]
name=baseos
baseurl=http://47.108.86.156/rhel9.0/x86_64/dvd/BaseOS/
gpgcheck=0
[appstream]
name=appstream
baseurl=http://47.108.86.156/rhel9.0/x86_64/dvd/AppStream
gpgcheck=0
#http://47.108.86.156/rhel9.0/x86_64/dvd/BaseOS/和http://47.108.86.156/rhel9.0/x86_64/dvd/AppStream是网络连接,
#baseurl:这个参数指定了软件仓库的 URL 地址。在这个例子中,baseurl 设置为http://47.108.86.156/rhel9.0/x86_64/dvd/BaseOS/ 和 http://47.108.86.156/rhel9.0/x86_64/dvd/AppStream/,这意味着 DNF 将从这个远程服务器上下载所需的软件包。
7.3.3 查看网络仓库
[root@localhost yum.repos.d]# cd
[root@localhost ~]# dnf repolist #列出所有已启用的仓库,意味着 DNF 可以从这些仓库下载和安装软件包。
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id repo name
appstream appstream
baseos baseos
#repo id:仓库的唯一标识符,在你的配置文件中对应于方括号内的名称,例如 [baseos] 和 [appstream]。
#repo name:仓库的描述性名称,对应于 .repo 文件中的 name 字段。
7.3.4 下载软件包测试仓库
网络仓库下载软件比较慢
[root@localhost ~]# dnf install vsftpd -y
7.4 源码安装(mysql的源码安装)
找到mysql官网:https://downloads.mysql.com/archives/community/
找到社区下载,选择9.1.0版本,选择源码安装
下载好后,将tar.gz包拖拽到xshell进行传送
将文件传到linux
[root@localhost ~]# rz -E
将文件传到桌面
se 文件名
如果se、re无法传输,可能是没有lrzsz文件
[root@localhost ~]# rpm -qa | grep lrz
lrzsz-0.12.20-55.el9.x86_64
特殊情况:文件里面有特殊字符会产生乱码无法传输,那就用xftp传送
7.4.1 安装mysql9.1.0并解压
#新建/mysql目录,将安装包移动到/mysql下面
[root@localhost ~]# mkdir /mysql
[root@localhost ~]# mv mysql-9.1.0.tar.gz /mysql/
[root@localhost ~]# cd /mysql/ #切换路径到/mysql/下面
[root@localhost mysql]# ll
total 468784
-rw-r--r--. 1 root root 480032080 Apr 19 14:52 mysql-9.1.0.tar.gz
#解压mysql
[root@localhost mysql]# tar xf mysql-9.1.0.tar.gz
[root@localhost mysql]# ll
total 468788
drwxr-xr-x. 32 7161 31415 4096 Sep 24 2024 mysql-9.1.0
-rw-r--r--. 1 root root 480032080 Apr 19 14:52 mysql-9.1.0.tar.gz
[root@localhost mysql]# cd mysql-9.1.0/ #继续切换路径
[root@localhost mysql-9.1.0]# ll
total 672
drwxr-xr-x. 7 7161 31415 4096 Sep 24 2024 client
drwxr-xr-x. 4 7161 31415 4096 Sep 24 2024 cmake
-rw-r--r--. 1 7161 31415 98307 Sep 24 2024 CMakeLists.txt
drwxr-xr-x. 19 7161 31415 4096 Sep 24 2024 components
-rw-r--r--. 1 7161 31415 10762 Sep 24 2024 config.h.cmake
-rw-r--r--. 1 7161 31415 23581 Sep 24 2024 configure.cmake
-rw-r--r--. 1 7161 31415 996 Sep 24 2024 CONTRIBUTING.md
drwxr-xr-x. 2 7161 31415 65 Sep 24 2024 Docs #文档
-rw-r--r--. 1 7161 31415 5527 Sep 24 2024 Doxyfile-ignored
-rw-r--r--. 1 7161 31415 123306 Sep 24 2024 Doxyfile.in
drwxr-xr-x. 3 7161 31415 124 Sep 24 2024 doxygen_resources
drwxr-xr-x. 21 7161 31415 4096 Sep 24 2024 extra
drwxr-xr-x. 3 7161 31415 8192 Sep 24 2024 include
-rw-r--r--. 1 7161 31415 333 Sep 24 2024 INSTALL #交换机安装
drwxr-xr-x. 3 7161 31415 21 Sep 24 2024 libbinlogevents
drwxr-xr-x. 4 7161 31415 54 Sep 24 2024 libchangestreams
drwxr-xr-x. 9 7161 31415 4096 Sep 24 2024 libmysql
drwxr-xr-x. 4 7161 31415 34 Sep 24 2024 libs
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 libservices
-rw-r--r--. 1 7161 31415 257474 Sep 24 2024 LICENSE #授权信息
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 man #man手册
drwxr-xr-x. 10 7161 31415 4096 Sep 24 2024 mysql-test
-rw-r--r--. 1 7161 31415 123 Sep 24 2024 MYSQL_VERSION
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 mysys
drwxr-xr-x. 10 7161 31415 131 Sep 24 2024 packaging
drwxr-xr-x. 24 7161 31415 4096 Sep 24 2024 plugin
-rw-r--r--. 1 7161 31415 666 Sep 24 2024 README #说明
drwxr-xr-x. 6 7161 31415 155 Sep 24 2024 router
-rw-r--r--. 1 7161 31415 6268 Sep 24 2024 run_doxygen.cmake
drwxr-xr-x. 5 7161 31415 4096 Sep 24 2024 scripts
-rw-r--r--. 1 7161 31415 1770 Sep 24 2024 SECURITY.md
drwxr-xr-x. 3 7161 31415 155 Sep 24 2024 share
drwxr-xr-x. 25 7161 31415 24576 Sep 24 2024 sql
drwxr-xr-x. 3 7161 31415 4096 Sep 24 2024 sql-common
drwxr-xr-x. 15 7161 31415 4096 Sep 24 2024 storage
drwxr-xr-x. 3 7161 31415 4096 Sep 24 2024 strings
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 support-files
drwxr-xr-x. 2 7161 31415 101 Sep 24 2024 testclients
drwxr-xr-x. 5 7161 31415 70 Sep 24 2024 unittest
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 utilities
drwxr-xr-x. 2 7161 31415 87 Sep 24 2024 vector-common
drwxr-xr-x. 2 7161 31415 4096 Sep 24 2024 vio
7.4.1.1 查看源码安装文档
找到mysql8.4文档手册,查找安装源码的方法:https://dev.mysql.com/doc/refman/8.4/en/source-installation.html
点开2.8.4 Installing MySQL Using a Standard Source Distribution往下滑发现有安装的具体代码
图片中tar zxvf mysql-VERSION.tar.gz的VERSION是自己下载的版本
在上面解压并安装的步骤中,我们已经切换到mysql的版本了
[root@localhost mysql]# cd mysql-9.1.0/
7.4.2 源码安装三大步骤
源码安装三大核心步骤
== cmake…(即config的指令,…指上一级目录) ==
== make ==
== make install==
其中make,make install需要很长时间
7.4.2.1 建立一个新的目录bld
在单独的目录(如 bld)中进行构建,可以避免污染源代码目录。
[root@localhost mysql-9.1.0]# mkdir bld
[root@localhost mysql-9.1.0]# cd bld/
[root@localhost bld]# cmake ..
bash: cmake: command not found...
没有cmake命令,则挂载仓库进行下载,由于前面我们建立了网络仓库,为了不让它在网络上去下载在本地下载,提高其下载速度,我们将对仓库进行修改,让它在/mnt下面
[root@localhost bld]# cd /etc/yum.repos.d/ #切换到仓库路径下面
[root@localhost yum.repos.d]# vim wangluo.repo
[root@localhost yum.repos.d]# cat wangluo.repo
[baseos]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=/mnt/AppStream
gpgcheck=0
[root@localhost yum.repos.d]# cd - #切回路径
/mysql/mysql-9.1.0/bld
[root@localhost bld]# mount /dev/sr0 /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/root/RHEL-9-3-0-BaseOS-x86_64.
[root@localhost bld]# dnf install cmake
7.4.2.2 cmake …
纠错1 安装一些软件包 yum install gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils gcc-toolset-13-annobin-annocheck gcc-toolset-13-annobin-plugin-gcc
[root@localhost bld]# cmake ..
-- Running cmake version 3.20.2
-- Found Git: /usr/bin/git (found version "2.39.3")
-- This is .el9. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
CMake Warning at CMakeLists.txt:396 (MESSAGE):
Could not find devtoolset compiler/linker in /opt/rh/gcc-toolset-13
CMake Warning at CMakeLists.txt:398 (MESSAGE):
You need to install the required packages:
yum install gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils gcc-toolset-13-annobin-annocheck gcc-toolset-13-annobin-plugin-gcc
CMake Error at CMakeLists.txt:400 (MESSAGE):
Or you can set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.
-- Configuring incomplete, errors occurred!
报错,根据提示,需要安装一些包,安装包后继续执行cmake …
[root@localhost bld]# yum install gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils gcc-toolset-13-annobin-annocheck gcc-toolset-13-annobin-plugin-gcc
[root@localhost bld]# cmake ..
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
--
Could not find system OpenSSL
Make sure you have specified a supported SSL version.
Valid options are :
openssl[0-9]+ (use alternative system library)
yes (synonym for system)
</path/to/custom/openssl/installation>
CMake Error at cmake/ssl.cmake:85 (MESSAGE):
Please install the appropriate openssl developer package.
Call Stack (most recent call first):
cmake/ssl.cmake:370 (FATAL_SSL_NOT_FOUND_ERROR)
cmake/ssl.cmake:551 (FIND_SYSTEM_OPENSSL)
CMakeLists.txt:1824 (MYSQL_CHECK_SSL)
-- Configuring incomplete, errors occurred!
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeOutput.log".
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeError.log".
根据上面信息显示又报错,Could NOT find OpenSSL说没有找到OpenSSL,但是查询后发现有openssl,但不是openssl开发包
[root@localhost bld]# rpm -qa | grep openssl
openssl-libs-3.0.7-24.el9.x86_64
openssl-3.0.7-24.el9.x86_64
xmlsec1-openssl-1.2.29-9.el9.x86_64
apr-util-openssl-1.6.1-23.el9.x86_64
[root@localhost bld]#
查找openssl开发包
[root@localhost bld]# dnf list | grep openssl-devel
openssl-devel.i686 1:3.0.7-24.el9 appstream
openssl-devel.x86_64 1:3.0.7-24.el9 appstream
纠错2 没有安装openssl开发包
注意:源码安装需要开发包,虽然有openssl但不是开发包
安装开发包
[root@localhost bld]# dnf install openssl-devel
继续cmake …
[root@localhost bld]# cmake ..
CMake Error at cmake/readline.cmake:93 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:127 (FIND_CURSES)
cmake/readline.cmake:221 (MYSQL_USE_BUNDLED_EDITLINE)
CMakeLists.txt:1931 (MYSQL_CHECK_EDITLINE)
-- Configuring incomplete, errors occurred!
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeOutput.log".
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeError.log".
又报错,Curses library not found说没有找到库
纠错3 安装库
[root@localhost bld]# dnf install ncurses-devel -y
[root@localhost bld]# cmake ..
CMake Warning at cmake/rpc.cmake:41 (MESSAGE):
Cannot find RPC development libraries. You need to install the required
packages:
Debian/Ubuntu: apt install libtirpc-dev
RedHat/Fedora/Oracle Linux: yum install libtirpc-devel
SuSE: zypper install glibc-devel
Call Stack (most recent call first):
cmake/rpc.cmake:107 (WARN_MISSING_SYSTEM_TIRPC)
CMakeLists.txt:2062 (MYSQL_CHECK_RPC)
CMake Error at cmake/rpc.cmake:108 (MESSAGE):
Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc
Call Stack (most recent call first):
CMakeLists.txt:2062 (MYSQL_CHECK_RPC)
-- Configuring incomplete, errors occurred!
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeOutput.log".
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeError.log".
又报错,说没有找到rpc
纠错4 安装rpc
[root@localhost bld]# yum install libtirpc-devel
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:26:51 ago on Sat 19 Apr 2025 03:58:37 PM CST.
No match for argument: libtirpc-devel
Error: Unable to find a match: libtirpc-devel
报错说没有libtirpc-devel,查找libtirpc,版本是1.3.3-2。
[root@localhost bld]# rpm -qa | grep libtirpc
libtirpc-1.3.3-2.el9.x86_64
[root@localhost bld]#
- 然后我们去官网下载libtirpc-devel的1.3.3-2版本
官网:https://pkgs.org/download/libtirpc-devel
https://centos.pkgs.org/9-stream/centos-crb-x86_64/libtirpc-devel-1.3.3-2.el9.x86_64.rpm.html(1.3.3-2所在网址)
- 点进去后,找到download,复制第一个的链接
- 回到xshell进行下载、安装
[root@localhost bld]# wget https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/libtirpc-devel-1.3.3-2.el9.x86_64.rpm
--2025-04-19 16:38:40-- https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/libtirpc-devel-1.3.3-2.el9.x86_64.rpm
Resolving mirror.stream.centos.org (mirror.stream.centos.org)... 3.165.75.19, 3.165.75.70, 3.165.75.51, ...
Connecting to mirror.stream.centos.org (mirror.stream.centos.org)|3.165.75.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 129196 (126K) [application/x-rpm]
Saving to: ‘libtirpc-devel-1.3.3-2.el9.x86_64.rpm’
libtirpc-devel-1.3.3-2.el9 100%[========================================>] 126.17K 186KB/s in 0.7s
2025-04-19 16:38:42 (186 KB/s) - ‘libtirpc-devel-1.3.3-2.el9.x86_64.rpm’ saved [129196/129196]
[root@localhost bld]# ll
total 184
-rw-r--r--. 1 root root 50129 Apr 19 16:20 CMakeCache.txt
drwxr-xr-x. 6 root root 152 Apr 19 16:05 CMakeFiles
drwxr-xr-x. 8 root root 90 Apr 19 16:20 extra
-rw-r--r--. 1 root root 129196 Jun 7 2023 libtirpc-devel-1.3.3-2.el9.x86_64.rpm
-rw-r--r--. 1 root root 123 Apr 19 16:05 VERSION.dep
#安装
[root@localhost bld]# rpm -i libtirpc-devel-1.3.3-2.el9.x86_64.rpm
warning: libtirpc-devel-1.3.3-2.el9.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
#查看是否安装成功
[root@localhost bld]# rpm -qa | grep libtirpc-devel
libtirpc-devel-1.3.3-2.el9.x86_64
- 继续cmake …
[root@localhost bld]# cmake ..
CMake Warning at cmake/rpc.cmake:30 (MESSAGE):
Cannot find rpcgen executable. You need to install the required packages:
Debian/Ubuntu: apt install rpcsvc-proto
RedHat/Fedora/Oracle Linux: yum install rpcgen
SuSE: zypper install glibc-devel
Call Stack (most recent call first):
plugin/group_replication/libmysqlgcs/cmake/rpcgen.cmake:123 (WARN_MISSING_RPCGEN_EXECUTABLE)
plugin/group_replication/libmysqlgcs/CMakeLists.txt:51 (INCLUDE)
CMake Error at plugin/group_replication/libmysqlgcs/cmake/rpcgen.cmake:124 (MESSAGE):
Could not find rpcgen
Call Stack (most recent call first):
plugin/group_replication/libmysqlgcs/CMakeLists.txt:51 (INCLUDE)
-- Configuring incomplete, errors occurred!
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeOutput.log".
See also "/mysql/mysql-9.1.0/bld/CMakeFiles/CMakeError.log".
报错,没有找到rpcgen Cannot find rpcgen
纠错5 安装rpcgen
[root@localhost bld]# yum install rpcgen
- 继续cmake …
[root@localhost bld]# cmake ..
-- CMAKE_CXX_FLAGS_DEBUG: -DSAFE_MUTEX -DENABLED_DEBUG_SYNC -g
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -g1
-- CMAKE_CXX_FLAGS_RELEASE: -ffunction-sections -fdata-sections -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL: -ffunction-sections -fdata-sections -Os -DNDEBUG
-- CMAKE_C_LINK_FLAGS:
-- CMAKE_CXX_LINK_FLAGS: -Wl,--copy-dt-needed-entries
-- CMAKE_EXE_LINKER_FLAGS
-- CMAKE_MODULE_LINKER_FLAGS
-- CMAKE_SHARED_LINKER_FLAGS
-- Configuring done
-- Generating done
-- Build files have been written to: /mysql/mysql-9.1.0/bld
至此 cmake …成功
7.4.2.3 make;make install(需要很长时间)
[root@localhost bld]# make;make install
等make加载结束,mysql就安装完成了