gpt4 book ai didi

java - GCP 数据存储模拟器无法安装在 OpenJDK 10 上

转载 作者:行者123 更新时间:2023-12-02 01:39:21 27 4
gpt4 key购买 nike

我有一台 Ubuntu 主机,我使用 APT 安装了 OpenJDK 10 和 Gloud SDK。当我尝试安装“google-cloud-sdk-datastore-emulator”时,出现如下错误。我在 GCP GitHub 上找到了一个讨论此问题的线程,但它已关闭。在这里 - https://github.com/GoogleCloudPlatform/cloud-sdk-docker/issues/144

还有人遇到这个问题吗?

错误 -

# apt install google-cloud-sdk-datastore-emulator
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
google-cloud-sdk-datastore-emulator : Depends: openjdk-8-jdk but it is not installable
E: Unable to correct problems, you have held broken packages.

我的环境 -

操作系统 -

DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"

OpenJDK -

#java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
#javac -version
javac 10.0.2
#which java
/usr/bin/java

Gcloud sdk -

# gcloud -v
Google Cloud SDK 234.0.0
alpha 2019.02.08
beta 2019.02.08
bq 2.0.41
core 2019.02.08
gsutil 4.36
kubectl 2019.02.08

最佳答案

我们的 debian 软件包依赖配置存在一些问题。尽管如果您通过 gcloud 命令安装模拟器,它应该可以工作:

gcloud 组件安装 cloud-datastore-emulator

( https://cloud.google.com/sdk/gcloud/reference/components/install )

请注意,如果从其他包管理器安装 sdk,组件管理器将不起作用。在这种情况下,您可以删除它并按照此处的建议进行安装:stackoverflow.com/questions/42697026

如果由于某些其他原因您必须通过 apt-get 安装,https://serverfault.com/questions/250224应该有帮助,基本上避免安装 openjdk:

apt-get install google-cloud-sdk-datastore-emulator openjdk-8-jdk-

注意 openjdk-8-jdk 后面有一个“-”

或者您可以按照同一线程中的步骤来更新包依赖项。

关于java - GCP 数据存储模拟器无法安装在 OpenJDK 10 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54665337/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com