[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.
相关推荐
2601_962218615 小时前
万象生鲜系统业财一体化底层打通技术自动生成经营账单
大数据·数据库·人工智能·python·算法
李高钢6 小时前
Python FastAPI 框架入门:从零搭建你的第一个高性能 API 服务
数据库·python·fastapi
toooooop87 小时前
MySQL source导入实战:踩坑记,phpMyAdmin 502、source导入巨慢问题解决
mysql
yuzhiboyouye8 小时前
那xml对应的sql语法,列举一下
xml·数据库·sql
. . . . .8 小时前
乐观锁 vs 悲观锁
数据库·sql
Leo.yuan8 小时前
2026年多数据库实时同步的四种架构方案及工具推荐
数据库·架构
hasty9 小时前
Origin 校验不是身份认证:MySQL MCP Server 漏洞给 AI 平台的警告
数据库·mysql·安全
梦想平凡10 小时前
百游棋牌源代码开发搭建教程(五):房间创建、座位分配与请求幂等实现
前端·javascript·数据库·源代码管理
凤山老林10 小时前
Spring Boot 整合 Flowable 的企业级落地指南
数据库·spring boot·后端·flowable·工作流
企业数字化笔记10 小时前
AI写的系统出现504怎么办?接口超时和数据库慢查询排查
数据库·后端