---
title: "configure: error: C++ preprocessor \"/lib/cpp\" fails sanity check"
author: "lixw"
date: "2010-02-05T15:09:07Z"
tags: []
categories: ["操作系统"]
slug: "configure-error-c-preprocessor-lib-cpp-fails-sanity-check"
draft: false
lastmod: "2010-02-05T15:09:07Z"
id: 588268
url: "https://samueli.iteye.com/blog/588268"
---

转自：http://hi.baidu.com/serial\_story/blog/item/e9d6668213bb85aa0cf4d293.html

 

**configure: error: C++ preprocessor "/lib/cpp" fails sanity check**

according to some articles on web:

1.*http://forum.ubuntu.org.cn/viewtopic.php?f=85&t=102970*

出现该情况是由于c++编译器的相关package没有安装，以超级用户登陆，在终端上执行：  
#yum install glibc-headers  
#yum install gcc-c++

2\. To solve the error `C++ preprocessor "/lib/cpp" fails sanity check` while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages

```
gcc cpp g++
```

but that is for other Linux distribution system, my is **Ubuntu** , so we should install the needed libs

***sudo aptitude install build-essential***

this will download and install the essential lib that is build related, such as gcc g++ ....