[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.
相关推荐
wmfglpz882 小时前
使用Python进行PDF文件的处理与操作
jvm·数据库·python
IOT-Power2 小时前
Qt+C++ 控制软件架构实例
开发语言·c++·qt
草莓熊Lotso2 小时前
Linux 进程间通信之命名管道(FIFO):跨进程通信的实用方案
android·java·linux·运维·服务器·数据库·c++
草莓熊Lotso2 小时前
MySQL 表约束核心指南:从基础约束到外键关联(含实战案例)
android·运维·服务器·数据库·c++·人工智能·mysql
XiaoLeisj2 小时前
Android 文件与数据存储实战:SharedPreferences、SQLite 与 Room 的渐进式实现
android·java·数据库·ui·sqlite·room·sp
scofield_gyb2 小时前
【MySQL】表空间丢失处理(Tablespace is missing for table 错误处理)
数据库·mysql
蘑菇小白2 小时前
基于嵌入式的数据库SQLite
linux·数据库·sqlite
梨落秋霜2 小时前
Python入门篇【连接数据库】
数据库·python·oracle
Ronin3052 小时前
【Qt常用控件】输入类控件
开发语言·qt·常用控件·输入类控件