Fix: fatal error: No such file or directory compilation terminated


fatal error: No such file or directory compilation terminated.

To fix the above error when trying to build a shared library using C extension (in gcc) you have to make sure that you have installed the Python dev libraries.

Run the below commands in the terminal .

sudo apt-get install python-dev
sudo apt-get install python3-dev
Fix- fatal error- No such file or directory compilation terminated

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap