Ubuntu 安装stackdriver代理挂起在";设置stackdriver代理(6.1.3-1.buster)“;

Ubuntu 安装stackdriver代理挂起在";设置stackdriver代理(6.1.3-1.buster)“;,ubuntu,google-cloud-platform,apt-get,stackdriver,Ubuntu,Google Cloud Platform,Apt Get,Stackdriver,我正尝试按照以下说明在GCP实例上设置监视: 设置此设置的命令有: curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh sudo bash add-monitoring-agent-repo.sh sudo apt-get update sudo apt-get install stackdriver-agent sudo service stackdriver-agent start curl -s

我正尝试按照以下说明在GCP实例上设置监视:

设置此设置的命令有:

curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh
sudo bash add-monitoring-agent-repo.sh
sudo apt-get update
sudo apt-get install stackdriver-agent
sudo service stackdriver-agent start
curl -sSO https://dl.google.com/cloudagents/add-logging-agent-repo.sh
sudo bash add-logging-agent-repo.sh
sudo apt-get update
sudo apt-get install google-fluentd
sudo apt-get install google-fluentd-catch-all-config-structured
sudo service google-fluentd start
运行此命令时,安装挂起在:

正在设置stackdriver代理(6.1.3-1.buster)

以下是截至该点的完整输出:

No changes made.
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease                                                                                                             
Hit:3 http://deb.debian.org/debian buster-updates InRelease                                                                                                     
Hit:4 http://deb.debian.org/debian buster-backports InRelease                                                                                                   
Hit:5 https://download.docker.com/linux/ubuntu xenial InRelease                                                                                                 
Hit:6 http://packages.cloud.google.com/apt cloud-sdk-buster InRelease                                                                     
Hit:7 https://packages.cloud.google.com/apt google-cloud-logging-buster-all InRelease
Hit:8 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-buster InRelease
Hit:9 https://packages.cloud.google.com/apt google-cloud-monitoring-buster-all InRelease
Hit:10 http://packages.cloud.google.com/apt google-compute-engine-buster-stable InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libfl2 libhiredis0.14 libmariadb3 libpython2.7 libyajl2 mariadb-common mysql-common
Suggested packages:
  default-jre libhiredis0.13 libmariadbclient18
The following NEW packages will be installed:
  libfl2 libhiredis0.14 libmariadb3 libpython2.7 libyajl2 mariadb-common mysql-common stackdriver-agent
0 upgraded, 8 newly installed, 0 to remove and 110 not upgraded.
Need to get 0 B/2542 kB of archives.
After this operation, 8162 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package libfl2:amd64.
(Reading database ... 71971 files and directories currently installed.)
Preparing to unpack .../0-libfl2_2.6.4-6.2_amd64.deb ...
Unpacking libfl2:amd64 (2.6.4-6.2) ...
Selecting previously unselected package libhiredis0.14:amd64.
Preparing to unpack .../1-libhiredis0.14_0.14.0-3_amd64.deb ...
Unpacking libhiredis0.14:amd64 (0.14.0-3) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../2-mysql-common_5.8+1.0.5_all.deb ...
Unpacking mysql-common (5.8+1.0.5) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../3-mariadb-common_1%3a10.3.27-0+deb10u1_all.deb ...
Unpacking mariadb-common (1:10.3.27-0+deb10u1) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../4-libmariadb3_1%3a10.3.27-0+deb10u1_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.3.27-0+deb10u1) ...
Selecting previously unselected package libpython2.7:amd64.
Preparing to unpack .../5-libpython2.7_2.7.16-2+deb10u1_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.16-2+deb10u1) ...
Selecting previously unselected package libyajl2:amd64.
Preparing to unpack .../6-libyajl2_2.1.0-3_amd64.deb ...
Unpacking libyajl2:amd64 (2.1.0-3) ...
Selecting previously unselected package stackdriver-agent.
Preparing to unpack .../7-stackdriver-agent_6.1.3-1.buster_amd64.deb ...
Unpacking stackdriver-agent (6.1.3-1.buster) ...
Setting up mysql-common (5.8+1.0.5) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libpython2.7:amd64 (2.7.16-2+deb10u1) ...
Setting up libyajl2:amd64 (2.1.0-3) ...
Setting up mariadb-common (1:10.3.27-0+deb10u1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libmariadb3:amd64 (1:10.3.27-0+deb10u1) ...
Setting up libfl2:amd64 (2.6.4-6.2) ...
Setting up libhiredis0.14:amd64 (0.14.0-3) ...
Setting up stackdriver-agent (6.1.3-1.buster) ...
一些补充说明:

当我第一次尝试运行它时,我需要运行一个错误:

sudo dpkg—配置-a

我第一次这样做时,系统挂起在:

设置anacron

所以我看了这个答案:

这建议卸载并重新安装有问题的应用程序,因此我删除了anacron(使用dpkg/apt get),然后尝试重新安装它,但在以下步骤重新安装anacron时它仍然挂起:

已创建符号链接/etc/systemd/system/timers.target.wants/anacron.timer→ /lib/systemd/system/anacron.timer

所以我再次删除了它,并且能够运行dpkg configure命令

现在我无法安装anacron或stackdriver代理。也许我不能安装其他东西,所以这可能是包管理器状态的问题。我尝试了一些不同的更新/修复/修复类型的命令,这些命令似乎没有任何影响

联阿援助团的产出是:


Linux instancename 4.19.0-9-cloud-amd64#1 SMP Debian 4.19.118-2+deb10u1(2020-06-07)x86_64 GNU/Linux

我已尝试从给定文档中安装Stackdriver代理,并且可以成功安装该代理。由于安装监视代理时遇到挂起,请尝试重新启动VM实例。您还可以参考以下链接了解代理安装的疑难解答: