2018-12-23 12:29:21 +00:00
|
|
|
# apk
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> Alpine Linux 的包管理工具。
|
2021-07-09 15:45:55 +01:00
|
|
|
> 更多信息: <https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management>.
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 从所有的远程仓库中更新仓库索引:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
|
|
|
`apk update`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 安装一个新软件包:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2019-01-01 05:39:40 +00:00
|
|
|
`apk add {{软件包}}`
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 移除一个软件包:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2019-01-01 05:39:40 +00:00
|
|
|
`apk del {{软件包}}`
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 修复或更新软件包而不修改主依赖项:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2019-01-01 05:39:40 +00:00
|
|
|
`apk fix {{软件包}}`
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 通过关键字查找软件包:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2019-01-01 05:39:40 +00:00
|
|
|
`apk search {{关键字}}`
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 获取指定软件包的相关信息:
|
2018-12-23 12:29:21 +00:00
|
|
|
|
2019-01-01 05:39:40 +00:00
|
|
|
`apk info {{软件包}}`
|