Coding⏱️ 3 min read📅 2026-06-11

How to Fix: How can I fix "uuid/uuid.h - No such file" error in CentOS

Error fixing uuid/uuid.h - No such file or directory in CentOS 7

Quick Answer: Install the uuid package to fix the issue.

The 'uuid/uuid.h - No such file or directory' error occurs when the system cannot find the UUID library, which is required for certain development projects. This issue affects users of CentOS 7 (64 bit) who are trying to build and compile their projects.

This error can be frustrating as it prevents the compilation process from completing successfully. However, with the right steps, you can easily resolve this issue by installing the necessary package and updating your system.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the UUID library is not installed or not properly configured on the system. This can happen if the 'uuid-devel' package is not sufficient to meet the requirements of your project.
  • Alternatively, it could be due to a misconfiguration of the system's package manager or a missing dependency in the project's build process.

🔧 Proven Troubleshooting Steps

Installing the uuid package

  1. Step 1: Open a terminal and install the 'uuid' package using the following command: sudo yum install -y uuid
  2. Step 2: This will ensure that the UUID library is installed on your system, which should resolve the error.
  3. Step 3: Once the installation is complete, restart the terminal or log out and log back in to ensure that the changes take effect.

Installing uuid-devel package

  1. Step 1: Open a terminal and install the 'uuid-devel' package using the following command: sudo yum install -y uuid-devel
  2. Step 2: This will provide you with the necessary development files for building projects that require UUID functionality.
  3. Step 3: However, note that installing only 'uuid-devel' may not be sufficient to resolve the error if other dependencies are missing.

✨ Wrapping Up

To summarize, the 'uuid/uuid.h - No such file or directory' error can be resolved by installing the necessary package using either the 'uuid' or 'uuid-devel' command. By following these steps, you should be able to fix this issue and successfully build your project.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions