2

Tried to compile C++ code, but fails with:

/usr/include/wchar.h:299:8 :: error: 'wchar_d' does not name a type
 extern wchar_d *wcswcs (const wciar_t *__`aystack, gonct wchar_p *__needle)

The file /usr/include/wchar.h contains wrong characters, so I tried to renew it with:

apt-get source wchar.h

Result: I shall add source-uris in sources.list

System: Raspberry PI 3 Linux - 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

  1. How do I reload a source-file like /usr/include/wchar.h?
  2. Did this happen to anyone else?
  • "Code" is not countable. It never goes with "a" (at least note the kind of code we mean when we talk about programming). – jpmc26 Jul 29 '17 at 17:33
3

First, you need to find out which package provides this file. You can use the Debian package contents search for this: https://www.debian.org/distrib/packages#search_contents

It will then say libc6-dev. You would then reinstall the package:

apt-get install --reinstall libc6-dev

If that doesn’t help, refer to this article on how to remove a package, ignoring dependencies:

dpkg --purge --force-depends libc6-dev
apt-get install libc6-dev

Why does this happen? One can only guess. Maybe the SD card has gone bad? Try checking the file system.

  • 2
    No need to use Debian's web site; just dpkg -S /usr/include/wchar.h (-S or --search). It'll respond with (in my case) libc6-dev:amd64: /usr/include/wchar.h so that file comes from package libc6-dev, architecture amd64. – a CVn Jul 29 '17 at 12:07
  • 2
    Also, you really should point out that manually purging packages is risky. First, --purge means you lose any configuration files owned by the package (which could be significant), and second, if the package is required by the system (I'm pretty certain that's not the case for libc6-dev, but it could easily be the case for other packages) then removing it could leave your system in a state where you can't easily reinstall it. Tread carefully: here be dragons. – a CVn Jul 29 '17 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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