我尝试在 MacOS 12.1 M1 Silicon 上安装 hyperkit,但出现以下错误。
% brew install hyperkit
Error: hyperkit: no bottle available!
You can try to install from source with:
brew install --build-from-source hyperkit
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
Run Code Online (Sandbox Code Playgroud)
经过一些研究,我发现与 M1 Silicon 处理器不兼容M1 兼容性问题。
有解决方法吗?
我想在 M1 Silicon 上设置 minishift,而 Hyperkit …
有一些方法可以在 bash 命令中自动回答 -y,例如
RUN apt-get install -y nodejs
Run Code Online (Sandbox Code Playgroud)
但我有这个案子我想跑
dpkg --install someDebianpackage.deb && apt install --assume-yes --fix-broken
Run Code Online (Sandbox Code Playgroud)
它实际上为它给出的即时提示回答 y 但在后期它要求我配置地理区域并回答 6
在那之后,我想用 20 来回答与时区对应的城市的命令
然后再次回答 31,然后 1 与上述相同,用于不同的问题。
我想知道的是以非交互式方式将此命令作为单个命令运行。(我希望制作一个 docker 文件,并将上述命令与其他一些可以链接&&到RUN 命令中的命令放在一起,例如
RUN apt-get update && apt-get install sudo && "the above command along with their answers" && "some other command"
Run Code Online (Sandbox Code Playgroud)
我非常感谢对此的一些指导
我在访问onCancel/onOk 函数时this.state遇到问题。this.setState我想修改确认或取消弹出模态后的状态。如果有人有不同的方法,您的指导将会有所帮助。
import React from 'react';
import { Button, Modal } from 'antd';
class ExampleClass extends React.Component {
constructor() {
super();
this.state = {
bankInfo: 100,
};
}
onButtonClicked() {
this.setState({ bankInfo: 200 }); // works fine
Modal.confirm({
title: 'Are you sure delete this item?',
okType: 'danger',
onOk() {
this.setState({ bankInfo: 300 }); // Uncaught TypeError: Cannot read property 'setState' of undefined
},
onCancel() {
this.setState({ bankInfo: 400 }); // Uncaught TypeError: Cannot read property 'setState' …Run Code Online (Sandbox Code Playgroud) javascript reactjs antd ant-design-pro react-class-based-component
antd ×1
apple-m1 ×1
bash ×1
docker ×1
dockerfile ×1
hyperkit ×1
javascript ×1
linux ×1
macos ×1
minishift ×1
openshift ×1
react-class-based-component ×1
reactjs ×1