title: /usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
body: <p>I'm a beginner in linux and when I was running my first program &quot;HELLOWORLD&quot; on my raspberry pi this warning appeared:</p>
  <pre><code>pi@raspberrypi:~/raspitest $ g++ test.cpp -o test
  In file included from /usr/include/c++/8/ext/string_conversions.h:41,
                   from /usr/include/c++/8/bits/basic_string.h:6400,
                   from /usr/include/c++/8/string:52,
                   from /usr/include/c++/8/bits/locale_classes.h:40,
                   from /usr/include/c++/8/bits/ios_base.h:41,
                   from /usr/include/c++/8/ios:42,
                   from /usr/include/c++/8/ostream:38,
                   from /usr/include/c++/8/iostream:39,
                   from test.cpp:1:
  /usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No No such file or directory
   #include_next &lt;stdlib.h&gt;
                 ^~~~~~~~~~
  compilation terminated.
  </code></pre>
  <p>I was not using any make tools, just wrote the code via vim and ran the following command:
  <code>pi@raspberrypi:~/raspitest $ g++ test.cpp -o test</code></p>
  <p>The stdlib.h should have been in the right path:</p>
  <pre><code>pi@raspberrypi:~/raspitest $ locate stdlib.h
  /opt/Wolfram/WolframEngine/12.1/SystemFiles/Links/ArduinoLink/Resources/CSource/avr-libc/1.8.1/avr/include/stdlib.h
  /usr/include/stdlib.h
  /usr/include/arm-linux-gnueabihf/bits/stdlib.h
  /usr/include/c++/8/stdlib.h
  /usr/include/c++/8/tr1/stdlib.h
  /usr/include/freetype2/freetype/config/ftstdlib.h
  </code></pre>
  <p>here are my original code:</p>
  <pre><code>#include&lt;iostream&gt;
  #include&lt;stdlib.h&gt;
  using namespace std;
  int main()
  {
      cout &lt;&lt;&quot;hello,world&quot; &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  <p>and here is the output of <code>g++ -v test.cpp</code>:</p>
  <pre><code>pi@raspberrypi:~/raspitest $ g++ -v test.cpp
  Using built-in specs.
  COLLECT_GCC=g++
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
  Target: arm-linux-gnueabihf
  Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
  Thread model: posix
  gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) 
  COLLECT_GCC_OPTIONS='-v' '-shared-libgcc'  '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' '-marm' '-march=armv6+fp'
   /usr/lib/gcc/arm-linux-gnueabihf/8/cc1plus -quiet -v -imultilib . -imultiarch arm-linux-gnueabihf -D_GNU_SOURCE test.cpp -quiet -dumpbase test.cpp -mfloat-abi=hard -mfpu=vfp -mtls-dialect=gnu -marm -march=armv6+fp -auxbase test -version -o /tmp/cchrh8l9.s
  GNU C++14 (Raspbian 8.3.0-6+rpi1) version 8.3.0 (arm-linux-gnueabihf)
      compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP
  
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  ignoring duplicate directory &quot;/usr/include/arm-linux-gnueabihf/c++/8&quot;
  ignoring nonexistent directory &quot;/usr/local/include/arm-linux-gnueabihf&quot;
  ignoring nonexistent directory &quot;/usr/lib/gcc/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/include&quot;
  ignoring duplicate directory &quot;/usr/include&quot;
  #include &quot;...&quot; search starts here:
  #include &lt;...&gt; search starts here:
   /usr/include
   /usr/include/c++/8
   /usr/include/arm-linux-gnueabihf/c++/8
   /usr/include/c++/8/backward
   /usr/lib/gcc/arm-linux-gnueabihf/8/include
   /usr/local/include
   /usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed
   /usr/include/arm-linux-gnueabihf
  End of search list.
  GNU C++14 (Raspbian 8.3.0-6+rpi1) version 8.3.0 (arm-linux-gnueabihf)
      compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP
  
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  Compiler executable checksum: 7defdc925cf5fede452fc531d54623d1
  In file included from /usr/include/c++/8/ext/string_conversions.h:41,
                   from /usr/include/c++/8/bits/basic_string.h:6400,
                   from /usr/include/c++/8/string:52,
                   from /usr/include/c++/8/bits/locale_classes.h:40,
                   from /usr/include/c++/8/bits/ios_base.h:41,
                   from /usr/include/c++/8/ios:42,
                   from /usr/include/c++/8/ostream:38,
                   from /usr/include/c++/8/iostream:39,
                   from test.cpp:1:
  /usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: 没有那个文件或目录
   #include_next &lt;stdlib.h&gt;
                 ^~~~~~~~~~
  compilation terminated.
  </code></pre>