# E: unable to locate package

使用 apt-get 安裝套件時發生的錯誤

可能的原因是找不到倉庫

解決辦法如下

編輯 /etc/apt/sources.list\
使用 vim 或其他編輯器

加入以下內容

{% code title="sources.list" %}

```
deb http://http.kali.org/kali kali-rolling main contrib non-free
```

{% endcode %}

更新 apt-get\
`$ apt-get update`

這時應該會跑一些東西\
接著再安裝一次套件\
`$ apt-get install 套件`

如果以上沒有解決問題，就只能再 google 看看是甚麼問題了


---

# 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:

```
GET https://kanneg881.gitbook.io/workspace/zuo-ye-xi-tong/kali/e-unable-to-locate-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
