[LINUX] What to do if sys / cdefs.h does not exist

Symptoms

Make a note of what to do if you get the following error when compiling C language on Ubuntu 18.04.

sys/cdefs.h:There is no such file or directory

Coping

Normally, installing libc6-dev-i386 seems to cure it.

sudo apt install libc6-dev-i386

In my case, libc6-dev-i386 was already installed. It was solved by reinstalling libc6-dev.

sudo apt install --reinstall libc6-dev

Cause

/usr/include/sys/cdefs.h is a symbolic link to /usr/include/x86_64-linux-gnu/sys/cdefs.h. The cause was that the / usr / include / x86_64-linux-gnu / sys / did not exist.

You probably did it when you restored from a backup that excluded sys. It's too careless.

References

[Fatal error: sys / cdefs.h: No such file or directory |](https://qastack.jp/ubuntu/470796/fatal-error-sys-cdefs-h-no-such-file -or-directory)

Recommended Posts

What to do if sys / cdefs.h does not exist
What to do if pyenv install does not proceed with an error
What to do if pyenv is not enabled (zsh)
What to do if Python does not switch from the System version in pyenv
What to do if Jupyter Notebook on WSL does not start automatically in your browser
What to do if the user name is changed and the pyenv library path does not pass
What to do if you get Could not fetch URL 443 with pip
Notes on what to do when matplotlib scatter () / scatter3d () does not work
What to do if pipreqs results in UnicodeDecodeError
What to do if you can't pipenv shell
Note: What to do if pip install fails
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do if Docker-sync suddenly stops working
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
What to do when you get angry that libxml / xmlversion.h does not exist when you put lxml with pip
Example of what to do when the sample script does not work (OpenCV-Python)
What to do if you get angry with swapon failed: Operation not permitted
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do when the graph does not appear in jupyter (ipython) notebook
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
[EC2] What to do when selenium is stuck and processing does not proceed
What to do if Japanese language support is not completely installed on Ubuntu 16.04
What to do if pip install fails in Xcode 5.1
What to do if you can't pip install mysqlclient
No module named What to do if you get'libs.resources'
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
What to do if SciPy installation fails on CentOS
What to do if a UnicodeDecodeError occurs in pip
What to do if pip install fails to install dependent libraries
What to do when python3 type venv does not work well on Raspberry Pi
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do when Python starts up in Anaconda does not come out unexpectedly
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3
What to do when Japanese is not displayed on matplotlib
What to do if you are addicted to Windows character code
What to do if pip gives a DistributionError in Homebrew
What to do if you get "coverage unknown" in Coveralls
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if `pip install matplotlib` fails on Mac
What to do if you can't log in as root
What to do if you can't use WiFi on Linux
What to do if Linux VLC can no longer rotate
What to do if pip install mysqlclient fails on MacOS
What to do if you lose your EC2 key pair
How to create a new file when the specified file does not exist — write if the file exists
What to do if the image is not displayed using matplotlib etc. in the Docker container
What to do when Ubuntu crashes
What to do with Magics install
What to do if you can't install pyaudio with pip #Python
What to do if you get a minus zero in Python
CommandNotFoundError: Your shell has not been properly configured to use What to do if you get'conda activate'
What to do if intellisense doesn't work with Anaconda + VSCode + Tensorflow2.1
[VSCode] unable to import'google.cloud' What to do when pylint (import-error) does not recognize the Python import statement
What to do when the jupyterlab extension settings are not reflected
What to do if you get a UnicodeDecodeError with pip install
What to do with PYTHON release?
What to do if Insecure Platform Warning appears when running Python
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
What to do if the inode is exhausted on EC2 Linux