> For the complete documentation index, see [llms.txt](https://hansimov.gitbook.io/csapp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hansimov.gitbook.io/csapp/labs/labs-overview/common-problems.md).

# 常见问题

## gcc not found

原因：机器没有安装 gcc。

方法：运行下列命令：

运行：

```c
sudo apt-get install build-essential
```

**参考链接：**

* C compiler not found, Ubuntu - Stack Overflow
  * <https://stackoverflow.com/questions/22557029/c-compiler-not-found-ubuntu>

## fatal error: bits/libc-header-start.h: No such file or directory

原因：64 位机器的 gcc 只有 64 位的库，用 `-m32` 参数便会出错。

方法 1：删除 `-m32` 参数。但是这会导致许多依赖 32 位特性的代码错误。

方法 &#x32;**（推荐）**：安装 32 位的库：

```c
sudo apt-get install gcc-multilib
```

**参考链接：**

* c - "fatal error: bits/libc-header-start.h: No such file or directory" while compiling HTK - Stack Overflow
  * <https://stackoverflow.com/questions/54082459/fatal-error-bits-libc-header-start-h-no-such-file-or-directory-while-compili>
* 32 bit - Trouble compiling a 32 bit binary on a 64 bit machine - Ask Ubuntu
  * <https://askubuntu.com/questions/91909/trouble-compiling-a-32-bit-binary-on-a-64-bit-machine>

## 每次修改完代码，在 btest 前一定要重新 make

建议写成：

```c
make && ./btest
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hansimov.gitbook.io/csapp/labs/labs-overview/common-problems.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
