0

I have tried to install the latest version of Clang and LLVM (3.9) (http://releases.llvm.org/download.html#3.9.1) because the version of LLVM in Debian with apt-get is the 3.5...

But as a noob, I don't know how, I broke /usr/include:

#include <iostream>

int main()
{
  std::cout << "Hello World!" << std::endl;
}

I have this error (apt-get's version of clang, not the latest):

$ clang test.cpp
In file included from test.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ios:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/iosfwd:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/postypes.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cwchar:44:10: fatal error: 'wchar.h' file not found
#include <wchar.h>
         ^
1 error generated.

wchar.h exists but is in a subfolder of /usr/include:

$ find /usr/include -name 'wchar.h'
/usr/include/bsd/wchar.h
/usr/include/c++/4.9/tr1/wchar.h
/usr/include/x86_64-linux-gnu/bits/wchar.h

How can I reinstall and fix these files in /usr/include?

0
dpkg -S `realpath /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cwchar`

Then reinstall this package:

apt-get install --reinstall <package>
  • It doesn't work :/ Same problem after reinstallation – Ardakaniz Jan 25 '17 at 17:51
  • do it with all files which are affected. – Ipor Sircer Jan 25 '17 at 18:15
  • Sorry, many friends recommended me to install Arch instead of Debian because of his old packages, so now I have no more problem :) – Ardakaniz Jan 30 '17 at 5:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.