[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.
相关推荐
码农阿豪5 小时前
行标识符的抉择:深入理解数据库领域的OID与ROWID机制
数据库·oracle
不剪发的Tony老师6 小时前
MyCLI:一个增强型MySQL命令行客户端
数据库·mysql
SHANGHAILINGEN6 小时前
2400 万个未培养病毒重新定义病毒多样性
数据库·测序·组学
刘晨鑫16 小时前
PostgreSQL日常维护
数据库·postgresql
xiaokangzhe6 小时前
PG数据库日常应用
数据库·oracle
XDHCOM6 小时前
MySQL ER_DD_VERSION_INSTALLED报错解析,数据字典版本问题,故障修复与远程处理指南
数据库·mysql
努力的小郑6 小时前
Canal 不难,难的是用好:从接入到治理
后端·mysql·性能优化
yaoyouzhong8 小时前
MySQL 批量插入详解:快速提升大数据导入效率的实战方法
大数据·数据库·mysql
东北甜妹8 小时前
MySQL主从复制
mysql
NineData8 小时前
NineData V5.0 产品发布会:让 AI 成为数据管理的驱动力,4月16日!
数据库·人工智能·ai编程