[MySQL] Package ‘libtirpc‘, required by ‘virtual:world‘, not found

Package 'libtirpc', required by 'virtual:world', not found

-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")

-- Checking for module 'libtirpc'

-- Package 'libtirpc', required by 'virtual:world', not found

CMake Error at cmake/rpc.cmake:76 (MESSAGE):

Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc

Call Stack (most recent call first):

rapid/plugin/group_replication/configure.cmake:60 (MYSQL_CHECK_RPC)

rapid/plugin/group_replication/CMakeLists.txt:25 (INCLUDE)

-- Configuring incomplete, errors occurred!

You can build and install libtirpc-dev from source if you prefer not to use your distribution's package manager or need a specific version. Here's how you can do it:


Steps to Build libtirpc from Source

1. Download the Source Code

You can get the latest source from the official repository or via Git:

bash 复制代码
wget https://sourceforge.net/projects/libtirpc/files/libtirpc/1.3.3/libtirpc-1.3.3.tar.bz2
tar -xjf libtirpc-1.3.3.tar.bz2
cd libtirpc-1.3.3
2. Configure the Build

Run the following commands to configure the build:

bash 复制代码
sudo apt-get install autoconf
./bootstrap
./configure --prefix=/usr/local --disable-gssapi
  • The --prefix=/usr option installs the library and headers in standard system locations.
3. Compile and Install
bash 复制代码
make
sudo make install
4. Update the Dynamic Linker Cache

After installation, update the dynamic linker cache:

bash 复制代码
sudo ldconfig
5. Verify Installation

Check if the header file and library are installed:

bash 复制代码
ls /usr/include/tirpc/rpc/rpc.h
ls /usr/lib/libtirpc.*
6. Re-run CMake

Now, try re-running CMake for your project:

bash 复制代码
rm -rf CMakeCache.txt CMakeFiles/
cmake .

Troubleshooting

  • If you encounter permission issues, use sudo where necessary.
  • If the build fails, check for missing dependencies (like autoconf, automake, libtool, or gcc).
  • If you want to install to a custom location (not /usr), use --prefix=/your/custom/path and ensure your build system can find the headers and libraries.
相关推荐
小白舒_SC2 小时前
多个VS版本的Qt VS Tools的QtMsBuild不兼容问题
经验分享·qt
pixcarp3 小时前
知识库系统的内容资产闭环怎么设计
服务器·数据库·后端·golang
JosieBook3 小时前
【数据库】时序预测能力的分级进化:TimechoAI如何让每一类用户都能精准预见未来
java·开发语言·数据库
吴声子夜歌5 小时前
SQL经典实例——使用多张表
数据库·sql
倔强的石头_6 小时前
《Kingbase护城河》——深度解密数据库行锁冲突与等待事件架构
数据库
IT策士6 小时前
Redis 从入门到精通:性能调优与多语言客户端对比
数据库·redis·缓存
Bert.Cai7 小时前
Oracle INSTR函数详解
数据库·oracle
金色熊族9 小时前
QTransform使用心得(二)--仿射变换、非仿射变换、矩阵
qt·线性代数·矩阵
茉莉玫瑰花茶9 小时前
综合案例 - AI 智能租房助手 [ 5 ]
服务器·数据库·人工智能·python·ai
ywl4708120879 小时前
jwt生产token,简单版helloworld
java·数据库·spring