Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.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/2/node.js/42.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 如何在&;下安装应用程序;谷歌云平台实例上的主目录?_Linux_Google App Engine_Ubuntu_Google Cloud Platform - Fatal编程技术网

Linux 如何在&;下安装应用程序;谷歌云平台实例上的主目录?

Linux 如何在&;下安装应用程序;谷歌云平台实例上的主目录?,linux,google-app-engine,ubuntu,google-cloud-platform,Linux,Google App Engine,Ubuntu,Google Cloud Platform,我是谷歌云平台和Linux的初学者 我在谷歌云平台上设置了linux(ubuntu)实例,并尝试使用apt-get命令安装软件包,我得到了下面的指导 username@name_of_instance-145302:~$ sudo apt-get install ssh ******************************************************************************** You are running apt-get tool insi

我是谷歌云平台和Linux的初学者

我在谷歌云平台上设置了linux(ubuntu)实例,并尝试使用
apt-get
命令安装软件包,我得到了下面的指导

username@name_of_instance-145302:~$ sudo apt-get install ssh
********************************************************************************
You are running apt-get tool inside of Cloud Shell. Note that your Cloud Shell  
machine is ephemeral and will be reset once you are not using it interactively  
for about half an hour.  No system-wide change will persist beyond that.        
Note that your home directory does persist across VM instantiations, so consider
installing your tools into your home directory whenever possible.               
To suppress this warning, create an empty ~/.cloudshell/no-apt-get-warning file.
The command will automatically proceed in 5 seconds or on any key. 
Visit https://cloud.google.com/shell/help for more information.                 
********************************************************************************
此警告可能表示实例下除
$HOME
目录外的所有文件都将被清除。 我想将文件保存在
$HOME
目录下,但下载的软件包位于
/etc/package\u name
目录下,而不是
$HOME
目录下

因此,从
apt get
下载的任何应用程序都将在上次操作后30分钟内删除。
如何将包保存在
$HOME
目录中?

您试图从cloud shell而不是从实例运行apt get。您应该首先ssh到您的实例。(一个选项是使用“gcloud compute ssh”您的实例名),然后您将能够运行apt-get。

谢谢,我可以在ssh之后使用
apt-get
来访问我的实例。我应该了解更多关于gcloud的信息。