translated

This commit is contained in:
geekpi 2022-05-30 08:37:34 +08:00
parent 7b691b5b86
commit 93c81cb063
2 changed files with 95 additions and 95 deletions

View File

@ -1,95 +0,0 @@
[#]: subject: "Package is “set to manually installed”? What does it Mean?"
[#]: via: "https://itsfoss.com/package-set-manually-installed/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Package is “set to manually installed”? What does it Mean?
======
If you use the apt command to install packages in the terminal, youll see all kinds of output.
If you pay attention and read the output, sometimes youll notice a message that reads:
**package_name set to manually installed**
Have you ever wondered what this message means and why you dont see it for all packages? Let me share some details in this explainer.
### Understanding “Package set to manually installed”
Youll see this message when you try installing an already installed library or development package. This dependency package was installed automatically with another package. The dependency package gets removed with the apt autoremove command if the main package is removed.
But since you tried to install the dependency package explicitly, your Ubuntu system thinks that you need this package independent of the main package. And hence the package is marked as manually installed so that it is not removed automatically.
Not very clear, right? Take the example of [installing VLC on on Ubuntu][1].
Since the main vlc package depends on a number of other packages, those packages are automatically installed with it.
![installing vlc with apt ubuntu][2]
If you check the [list of installed packages][3] that have vlc in their name, youll see that except vlc, the rest are marked automatic. This indicates that these packages were installed automatically (with vlc) and they will be removed automatically with apt autoremove command (when vlc is uninstalled).
![list installed packages vlc ubuntu][4]
Now suppose you thought to install “vlc-plugin-base” for some reason. If you run the apt install command on it, the system tells you that the package is already installed. At the same time, it changes the mark from automatic to manual because the system thinks that you need this vlc-plugin-base explicitly as you tried to manually install it.
![package set manually][5]
You can see that its status has been changed to [installed] from [installed,automatic].
![listing installed packages with vlc][6]
Now, let me remove VLC and run the auoremove command. You can see that “vlc-plugin-base” is not in the list of packages to be removed.
![autoremove vlc ubuntu][7]
Check the list of installed packages again. vlc-plugin-base is still installed on the system.
![listing installed packages after removing vlc][8]
You can see two more vlc-related packages here. These are the dependencies for the vlc-plugin-base package and this is why they are also present on the system but marked automatic.
I believe things are more clear now with the examples. Let me add a bonus tip for you.
### Reset package to automatic
If the state of the package got changed to manual from automatic, you can set it back to automatic in the following manner:
```
sudo apt-mark auto package_name
```
![set package to automatic][9]
### Conclusion
This is not a major error and doesnt stop you from doing your work in your system. However, knowing these little things increase your knowledge a little.
**Curiosity may have killed the cat but it makes a penguin smarter**. Thats an original quote to add humor to this otherwise dull article :)
Let me know if you would like to read more such articles that may seem insignificant but help you understand your Linux system a tiny bit better.
--------------------------------------------------------------------------------
via: https://itsfoss.com/package-set-manually-installed/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-latest-vlc/
[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png
[3]: https://itsfoss.com/list-installed-packages-ubuntu/
[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png
[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png
[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png
[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png
[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png
[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png

View File

@ -0,0 +1,95 @@
[#]: subject: "Package is “set to manually installed”? What does it Mean?"
[#]: via: "https://itsfoss.com/package-set-manually-installed/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
软件包 “set to manually installed”这是什么意思
======
如果你使用 apt 命令在终端中安装软件包,你将看到各种输出。
如果你注意并查看输出,有时你会注意到一条消息:
**package_name set to manually installed**
你有没有想过这条消息是什么意思,为什么你没有在所有包上看到它?让我在本篇中分享一些细节。
### 理解 “Package set to manually installed”
当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 apt autoremove 命令删除依赖包。
但是由于你试图显式安装依赖包,你的 Ubuntu 系统认为你需要这个包独立于主包。因此,该软件包被标记为手动安装,因此不会自动删除。
不是很清楚,对吧?以[在 Ubuntu 上安装 VLC][1] 为例。
由于主 vlc 包依赖于许多其他包,因此这些包会自动安装。
![installing vlc with apt ubuntu][2]
如果你检查名称中包含 vlc 的[已安装软件包列表][3],你会看到除了 vlc其余都标记为“自动”。这表明这些软件包是自动安装的使用 vlc它们将使用 apt autoremove 命令自动删除(当 vlc 被卸载时)。
![list installed packages vlc ubuntu][4]
现在假设你出于某种原因考虑安装 “vlc-plugin-base”。如果你在其上运行 apt install 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为你在尝试手动安装时明确需要此 vlc-plugin-base。
![package set manually][5]
可以看到它的状态已经从 [installed,automatic] 变成了 [installed]。
![listing installed packages with vlc][6]
现在,让我删除 VLC 并运行 autoremove 命令。你可以看到 “vlc-plugin-base” 不在要删除的软件包列表中。
![autoremove vlc ubuntu][7]
再次检查已安装软件包的列表。vlc-plugin-base 仍然安装在系统上。
![listing installed packages after removing vlc][8]
你可以在这里看到另外两个与 vlc 相关的包。这些是 vlc-plugin-base 包的依赖项,这就是为什么它们也存在于系统上但标记为 “automatic” 的原因。
我相信现在有了这些例子,事情就更清楚了。让我给你一个额外提示。
### 将包重置为自动
如果包的状态从自动更改为手动,你可以通过以下方式将其设置回自动:
```
sudo apt-mark auto 包名
```
![set package to automatic][9]
### 结论
这不是一个重大错误,也不会阻止你在系统中进行工作。但是,了解这些小事会增加你的知识。
**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 :)
如果你想阅读更多这样的文章,这些文章可能看起来微不足道,但可以帮助你更好地了解您的 Linux 系统,请告诉我。
--------------------------------------------------------------------------------
via: https://itsfoss.com/package-set-manually-installed/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-latest-vlc/
[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png
[3]: https://itsfoss.com/list-installed-packages-ubuntu/
[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png
[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png
[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png
[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png
[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png
[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png