Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux bash:如果未安装,则自动安装软件包_Linux_Bash_Ubuntu_Package_Apt Get - Fatal编程技术网

Linux bash:如果未安装,则自动安装软件包

Linux bash:如果未安装,则自动安装软件包,linux,bash,ubuntu,package,apt-get,Linux,Bash,Ubuntu,Package,Apt Get,假设我以为我安装了SVN。我运行该命令并获得以下输出: aoneill@aoneill-Laptop:~/Documents$ svn The program 'svn' is currently not installed. You can install it by typing: sudo apt-get install subversion 我的问题是:我是否可以更改输出,或者捕捉到这样的情况,比如说,在结尾有一个提示 aoneill@aoneill-Laptop:~/Document

假设我以为我安装了SVN。我运行该命令并获得以下输出:

aoneill@aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion
我的问题是:我是否可以更改输出,或者捕捉到这样的情况,比如说,在结尾有一个提示

aoneill@aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion

Install the package? [y/n]
谢谢大家!!这将使包裹处理变得更好

export COMMAND_NOT_FOUND_INSTALL_PROMPT=1