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?

1 Answer 1

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>
3
  • It doesn't work :/ Same problem after reinstallation
    – Ardakaniz
    Jan 25, 2017 at 17:51
  • do it with all files which are affected. Jan 25, 2017 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, 2017 at 5:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .