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 is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

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