简体   繁体   中英

_ctermid.h: No such file or directory error on mac without Xcode

I was trying to compile my code using gcc 10.2.8 and I got this error:

scons: *** [S.os] Error 1
In file included from /usr/local/Cellar/gcc/10.2.0_2/include/c++/10.2.0/cstdio:42,
                 from Public_Library/C.h:10,
                 from Public_Library/D.h:11,
                 from Public_Library/RS.h:10,
                 from Projects/S/main.cpp:1:
/usr/local/Cellar/gcc/10.2.0_2/lib/gcc/10/gcc/x86_64-apple-darwin18/10.2.0/include-fixed/stdio.h:219:10: fatal error: _ctermid.h: No such file or directory

I found a few questions like this but the problem is I don't have Xcode on my mac and I have already updated my CommandLine tools several times and it did not work. I'm using OSX 10.14.6 by the way.

I'm just gonna add this in case it might help others. I updated my OSX to big sure and installed Xcode but that did not help. What solved the problem for me was getting an unshallow version of brew with this command: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

and then updating and upgrading my brew.

brew update

brew upgrade

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM