如何安装 libboost-coroutine1.62.0 Debian 9

在本教程中,我们学习如何安装 libboost-coroutine1.62.0 Debian 9. libboost-coroutine1.62.0 提供了一种单线程协作多任务处理

介绍

在本教程中我们学习如何安装 libboost-coroutine1.62.0 在 Debian 9.

什么是 libboost-coroutine1.62.0

libboost-coroutine1.62.0 是:

该软件包是 Boost C++ Libraries 集合的一部分。

Boost.Coroutine 为通用子例程提供模板,允许在某些位置使用多个入口点来暂停和恢复执行。 它保留执行的本地状态,并允许多次重新进入子例程(如果必须在函数调用之间保留状态,则很有用)。

协程可以被视为提供一种特殊类型的控制流的语言级构造。

与抢占式的线程相比,协程切换是协作的(程序员控制切换何时发生)。 内核不参与协程切换。

该实现使用 Boost.Context 进行上下文切换。

有三种安装方法 libboost-coroutine1.62.0 在 Debian 9.我们可以使用 apt-get, aptaptitude。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。

使用 apt-get 安装 libboost-coroutine1.62.0

更新 apt 数据库 apt-get 使用以下命令。

更新apt数据库后,我们可以安装 libboost-coroutine1.62.0 使用 apt-get 通过运行以下命令:

sudo apt-get -y install libboost-coroutine1.62.0

使用 apt 安装 libboost-coroutine1.62.0

更新 apt 数据库 apt 使用以下命令。

更新apt数据库后,我们可以安装 libboost-coroutine1.62.0 使用 apt 通过运行以下命令:

sudo apt -y install libboost-coroutine1.62.0

使用 aptitude 安装 libboost-coroutine1.62.0

如果您想遵循此方法,您可能需要先安装 aptitude,因为 aptitude 通常不会默认安装 Debian。 更新 apt 数据库 aptitude 使用以下命令。

更新apt数据库后,我们可以安装 libboost-coroutine1.62.0 使用 aptitude 通过运行以下命令:

sudo aptitude -y install libboost-coroutine1.62.0

如何卸载 libboost-coroutine1.62.0 Debian 9

仅卸载 libboost-coroutine1.62.0 打包我们可以使用以下命令:

sudo apt-get remove libboost-coroutine1.62.0

卸载libboost-coroutine1.62.0及其依赖项

卸载 libboost-coroutine1.62.0 及其不再需要的依赖项 Debian 9、我们可以使用下面的命令:

sudo apt-get -y autoremove libboost-coroutine1.62.0

删除 libboost-coroutine1.62.0 配置和数据

去除 libboost-coroutine1.62.0 配置和数据来自 Debian 9.我们可以使用以下命令:

sudo apt-get -y purge libboost-coroutine1.62.0

删除 libboost-coroutine1.62.0 配置、数据及其所有依赖项

我们可以使用下面的命令来删除 libboost-coroutine1.62.0 配置、数据及其所有依赖项,我们可以使用以下命令:

sudo apt-get -y autoremove --purge libboost-coroutine1.62.0

依赖关系

libboost-coroutine1.62.0 具有以下依赖项:

参考

概括

在本教程中我们学习如何安装 libboost-coroutine1.62.0 封装在 Debian 9.使用不同的包管理工具: apt, apt-getaptitude