如何解决安装 stackdriver-agent 在“Setting up stackdriver-agent (6.1.3-1.buster) ...”时挂起
我正在尝试按照以下说明在 GCP 实例上设置监控:
https://cloud.google.com/monitoring/quickstart-lamp
设置的命令是:
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-agent (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 --configure -a
我第一次这样做时,系统挂在:
设置 anacron
所以我看了这个答案:
https://askubuntu.com/questions/1215708/sudo-dpkg-configure-a-taking-forever
建议卸载并重新安装有问题的应用程序,所以我删除了 anacron(使用 dpkg/apt-get),然后尝试重新安装它,但在步骤重新安装 anacron 时它仍然挂起:
创建符号链接 /etc/systemd/system/timers.target.wants/anacron.timer → /lib/systemd/system/anacron.timer.
所以我再次将其删除,并且能够运行该 dpkg configure 命令。
现在我无法安装 anacron 或 stackdriver-agent。也许我无法安装其他东西,所以这可能是包管理器状态的问题。我尝试了一些不同的更新/修复/修复类型命令,但似乎没有任何影响。
uname -a 的输出是:
Linux 实例名称 4.19.0-9-cloud-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。