[英]apt-get install build-essential
I am writing bash script for vps server.我正在为 vps 服务器编写 bash 脚本。 I got this problem: I need to install the
build-essential
package by script.我遇到了这个问题:我需要通过脚本安装
build-essential
package。
Command using in script:脚本中使用命令:
eval 'apt-get install build-essential'
I coped with the problem (yes / no), found the -y
switch for apt-get
.我解决了这个问题(是/否),找到了
apt-get
的-y
开关。
eval 'apt-get -y install build-essential'
But how to get around the second problem?:但是如何解决第二个问题呢?:
(Enter the items or ranges you want to select, separated by spaces.)
Which services should be restarted?
I don't have to choose anything.我不必选择任何东西。 A simple press of Enter would solve the problem!
只需按一下 Enter 即可解决问题!
So, any所以,任何
echo, echo "\r", yes | apt-get -y install build-essential
does not working and my ideas are over!不起作用,我的想法结束了!
I figured out how to solve this problem.我想出了解决这个问题的方法。 The reboot service selection menu pops up on Ubuntu 22.04.
Ubuntu 22.04 弹出重启服务选择菜单。 I installed 20.04 and and there is no menu.
我安装了 20.04,但没有菜单。 Might be useful for someone!
可能对某人有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.