AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-173287

Kalle Richter's questions

Martin Hope
Kalle Richter
Asked: 2023-12-27 21:44:51 +0800 CST

如何通过一个命令安装或刷新快照?

  • 6

我只是在编写脚本期间注意到,很难确保已安装快照并刷新(如果已安装),因为snap install如果已安装快照则失败,snap refresh如果尚未安装快照则失败。--help我是否缺少任一命令中列出或未列出的某些选项?

我知道如何用 bash 编写这个脚本snap list,甚至是基本的脚本||(缺少大量错误情况)。但总得有个选择吧?

我使用的是 Ubuntu 23.10。

snap
  • 1 个回答
  • 223 Views
Martin Hope
Kalle Richter
Asked: 2019-09-09 01:07:56 +0800 CST

如何创建一个带有两个磁盘和一个镜像的 RAID1 btrfs?

  • 2

我想将我的 ZFS 池转换为 btrfs 文件系统,因为 ZFS 性能很差。zpool add我有以下设置,使用and很容易创建zpool attach:

        NAME        STATE     READ WRITE CKSUM
        data1       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            sda     ONLINE       0     0     0
            sdg     ONLINE       0     0     0
          mirror-2  ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sdc     ONLINE       0     0     0

sda和sdg是两个 5TB 硬盘,sdd是sdc两个 4TB 硬盘。因此,RAID1 设置跨越了一组以上的镜像设备。

Afaik for btrfs 可以在创建文件系统时创建 RAID1 设置,并使用btrfs convert. 但是,我没有找到有关如何传递mkfs.btrfs或btrfs device add解释参数的信息。也是如此btrfs balance。

我正在使用 Ubuntu 19.04。

btrfs filesystem raid
  • 1 个回答
  • 1490 Views
Martin Hope
Kalle Richter
Asked: 2019-09-01 01:15:37 +0800 CST

apt-file 正则表达式:使用或一次查找多个包

  • 4

我想使用带有逻辑或的正则表达式连接模式一次搜索多个包|。

假设这两个文件/usr/lib/apache2/modules/httpd.exp并/usr/lib/apt/apt.systemd.daily存在:

$ sudo dpkg -S /usr/lib/apache2/modules/httpd.exp
apache2-bin: /usr/lib/apache2/modules/httpd.exp
$ sudo dpkg -S /usr/lib/apt/apt.systemd.daily
apt: /usr/lib/apt/apt.systemd.daily

为什么apt-file search --regexp '/usr/lib/apache2/modules/httpd.exp|/usr/lib/apt/apt.systemd.daily'只返回

apache2-bin: /usr/lib/apache2/modules/httpd.exp

该解决方案旨在用于优化 GNOME 构建工具jhbuild。它应该适用于大量的 Ubuntu 版本。

apt regex apt-file
  • 1 个回答
  • 387 Views
Martin Hope
Kalle Richter
Asked: 2019-07-15 03:01:58 +0800 CST

如何列出未安装的所有可用版本?

  • 11

如何列出未安装的所有可用版本?

我正在使用带有 snap 2.39.3 的 Ubuntu 19.04。

versions snap
  • 1 个回答
  • 9474 Views
Martin Hope
Kalle Richter
Asked: 2019-05-05 00:46:53 +0800 CST

如何将“flatpak run org.gnome.meld”配置为 git diff.tool 和 merge.tool

  • 1

meld由于cairo或其他的本地安装混乱,我无法使用。我已经在其中投入了一些时间,包括将故障报告为错误,但维护者表示这不是一个看起来正确的错误。因此,我想尝试另一种更有前途的方法并使用flatpak安装。我可以meld像往常一样使用flatpak run org.gnome.meld,问题似乎是参数传递。

未提交更改失败的简单git config --global diff.tool "flatpak run org.gnome.meld"原因是git difftool

git config option diff.tool set to unknown tool: flatpak run org.gnome.meld
Resetting to default...

This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
meld opendiff kdiff3 tkdiff xxdiff kompare gvimdiff diffuse diffmerge ecmerge p4merge araxis bc codecompare emerge vimdiff

Viewing (1/1): 'a'
Launch 'meld' [Y/n]?

为了避免麻烦我创建了一个脚本

#!/bin/sh
flatpak run org.gnome.meld "$@"

in~/bin/并使用chmod +x ~/bin/meld. ~/bin/是我的第一个PATH并根据which meld。

在以下场景之后

> cd $(mktemp -d)
> git init .
Leeres Git-Repository in /tmp/tmp.2RFxjgBbQ5/.git/ initialisiert
> echo 1 > a
> git add a
> git commit -m "Initial commit"
[master (Basis-Commit) 997fe0d] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 a
> echo 2 > a
> git difftool

Viewing (1/1): 'a'
Launch 'meld' [Y/n]? 

meld启动以查看/tmp/cKSwbn_a和/home/[user]/a(用户混淆)两者都不存在。

我手头还有其他涉及 Docker 的不太舒服的解决方法,所以我最感兴趣的是了解这种方法如何工作。

merge git diff meld flatpak
  • 1 个回答
  • 394 Views
Martin Hope
Kalle Richter
Asked: 2019-04-14 09:10:12 +0800 CST

由于“字段不可变”,microk8s 上的“microk8s.enable istio”失败

  • 0

microk8s.enable istio在 microk8s 上由于field is immutable. 相关的失败输出是

Error from server (Invalid): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\":{\"annotations\":{\"helm.sh/hook\":\"post-install\",\"helm.sh/hook-delete-policy\":\"hook-succeeded\"},\"labels\":{\"app\":\"istio-grafana\",\"chart\":\"grafana-1.0.5\",\"heritage\":\"Tiller\",\"release\":\"istio\"},\"name\":\"istio-grafana-post-install\",\"namespace\":\"istio-system\"},\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"app\":\"istio-grafana\",\"release\":\"istio\"},\"name\":\"istio-grafana-post-install\"},\"spec\":{\"containers\":[{\"command\":[\"/bin/bash\",\"/tmp/grafana/run.sh\",\"/tmp/grafana/custom-resources.yaml\"],\"image\":\"quay.io/coreos/hyperkube:v1.7.6_coreos.0\",\"name\":\"hyperkube\",\"volumeMounts\":[{\"mountPath\":\"/tmp/grafana\",\"name\":\"tmp-configmap-grafana\"}]}],\"restartPolicy\":\"OnFailure\",\"serviceAccountName\":\"istio-grafana-post-install-account\",\"volumes\":[{\"configMap\":{\"name\":\"istio-grafana-custom-resources\"},\"name\":\"tmp-configmap-grafana\"}]}}}}\n"},"labels":{"chart":"grafana-1.0.5","release":"istio"}},"spec":{"template":{"metadata":{"labels":{"release":"istio"}}}}}
to:
Resource: "batch/v1, Resource=jobs", GroupVersionKind: "batch/v1, Kind=Job"
Name: "istio-grafana-post-install", Namespace: "istio-system"
Object: &{map["apiVersion":"batch/v1" "kind":"Job" "metadata":map["annotations":map["helm.sh/hook":"post-install" "helm.sh/hook-delete-policy":"hook-succeeded" "kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\":{\"annotations\":{\"helm.sh/hook\":\"post-install\",\"helm.sh/hook-delete-policy\":\"hook-succeeded\"},\"labels\":{\"app\":\"istio-grafana\",\"chart\":\"grafana-0.1.0\",\"heritage\":\"Tiller\",\"release\":\"RELEASE-NAME\"},\"name\":\"istio-grafana-post-install\",\"namespace\":\"istio-system\"},\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"app\":\"istio-grafana\",\"release\":\"RELEASE-NAME\"},\"name\":\"istio-grafana-post-install\"},\"spec\":{\"containers\":[{\"command\":[\"/bin/bash\",\"/tmp/grafana/run.sh\",\"/tmp/grafana/custom-resources.yaml\"],\"image\":\"quay.io/coreos/hyperkube:v1.7.6_coreos.0\",\"name\":\"hyperkube\",\"volumeMounts\":[{\"mountPath\":\"/tmp/grafana\",\"name\":\"tmp-configmap-grafana\"}]}],\"restartPolicy\":\"OnFailure\",\"serviceAccountName\":\"istio-grafana-post-install-account\",\"volumes\":[{\"configMap\":{\"name\":\"istio-grafana-custom-resources\"},\"name\":\"tmp-configmap-grafana\"}]}}}}\n"] "creationTimestamp":"2019-03-06T17:31:59Z" "labels":map["app":"istio-grafana" "chart":"grafana-0.1.0" "heritage":"Tiller" "release":"RELEASE-NAME"] "name":"istio-grafana-post-install" "namespace":"istio-system" "resourceVersion":"1603" "selfLink":"/apis/batch/v1/namespaces/istio-system/jobs/istio-grafana-post-install" "uid":"bf3accfa-4035-11e9-99ce-208984866d4f"] "spec":map["backoffLimit":'\x06' "completions":'\x01' "parallelism":'\x01' "selector":map["matchLabels":map["controller-uid":"bf3accfa-4035-11e9-99ce-208984866d4f"]] "template":map["metadata":map["creationTimestamp":<nil> "labels":map["app":"istio-grafana" "controller-uid":"bf3accfa-4035-11e9-99ce-208984866d4f" "job-name":"istio-grafana-post-install" "release":"RELEASE-NAME"] "name":"istio-grafana-post-install"] "spec":map["containers":[map["command":["/bin/bash" "/tmp/grafana/run.sh" "/tmp/grafana/custom-resources.yaml"] "image":"quay.io/coreos/hyperkube:v1.7.6_coreos.0" "imagePullPolicy":"IfNotPresent" "name":"hyperkube" "resources":map[] "terminationMessagePath":"/dev/termination-log" "terminationMessagePolicy":"File" "volumeMounts":[map["mountPath":"/tmp/grafana" "name":"tmp-configmap-grafana"]]]] "dnsPolicy":"ClusterFirst" "restartPolicy":"OnFailure" "schedulerName":"default-scheduler" "securityContext":map[] "serviceAccount":"istio-grafana-post-install-account" "serviceAccountName":"istio-grafana-post-install-account" "terminationGracePeriodSeconds":'\x1e' "volumes":[map["configMap":map["defaultMode":'\u01a4' "name":"istio-grafana-custom-resources"] "name":"tmp-configmap-grafana"]]]]] "status":map["completionTime":"2019-03-06T17:34:00Z" "conditions":[map["lastProbeTime":"2019-03-06T17:34:00Z" "lastTransitionTime":"2019-03-06T17:34:00Z" "status":"True" "type":"Complete"]] "startTime":"2019-03-06T17:31:59Z" "succeeded":'\x01']]}
for: "/snap/microk8s/483/actions/istio/istio-demo.yaml": Job.batch "istio-grafana-post-install" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"istio-grafana-post-install", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app":"istio-grafana", "controller-uid":"bf3accfa-4035-11e9-99ce-208984866d4f", "job-name":"istio-grafana-post-install", "release":"istio"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume{core.Volume{Name:"tmp-configmap-grafana", VolumeSource:core.VolumeSource{HostPath:(*core.HostPathVolumeSource)(nil), EmptyDir:(*core.EmptyDirVolumeSource)(nil), GCEPersistentDisk:(*core.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*core.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*core.GitRepoVolumeSource)(nil), Secret:(*core.SecretVolumeSource)(nil), NFS:(*core.NFSVolumeSource)(nil), ISCSI:(*core.ISCSIVolumeSource)(nil), Glusterfs:(*core.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*core.PersistentVolumeClaimVolumeSource)(nil), RBD:(*core.RBDVolumeSource)(nil), Quobyte:(*core.QuobyteVolumeSource)(nil), FlexVolume:(*core.FlexVolumeSource)(nil), Cinder:(*core.CinderVolumeSource)(nil), CephFS:(*core.CephFSVolumeSource)(nil), Flocker:(*core.FlockerVolumeSource)(nil), DownwardAPI:(*core.DownwardAPIVolumeSource)(nil), FC:(*core.FCVolumeSource)(nil), AzureFile:(*core.AzureFileVolumeSource)(nil), ConfigMap:(*core.ConfigMapVolumeSource)(0xc00c2d6640), VsphereVolume:(*core.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*core.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*core.PhotonPersistentDiskVolumeSource)(nil), Projected:(*core.ProjectedVolumeSource)(nil), PortworxVolume:(*core.PortworxVolumeSource)(nil), ScaleIO:(*core.ScaleIOVolumeSource)(nil), StorageOS:(*core.StorageOSVolumeSource)(nil), CSI:(*core.CSIVolumeSource)(nil)}}}, InitContainers:[]core.Container(nil), Containers:[]core.Container{core.Container{Name:"hyperkube", Image:"quay.io/coreos/hyperkube:v1.7.6_coreos.0", Command:[]string{"/bin/bash", "/tmp/grafana/run.sh", "/tmp/grafana/custom-resources.yaml"}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar(nil), Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount{core.VolumeMount{Name:"tmp-configmap-grafana", ReadOnly:false, MountPath:"/tmp/grafana", SubPath:"", MountPropagation:(*core.MountPropagationMode)(nil), SubPathExpr:""}}, VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"OnFailure", TerminationGracePeriodSeconds:(*int64)(0xc004976530), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"istio-grafana-post-install-account", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc00354ccb0), ImagePullSecrets:[]core.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil), DNSConfig:(*core.PodDNSConfig)(nil), ReadinessGates:[]core.PodReadinessGate(nil), RuntimeClassName:(*string)(nil), EnableServiceLinks:(*bool)(nil)}}: field is immutable
Error from server (Invalid): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\":{\"annotations\":{\"helm.sh/hook\":\"post-delete\",\"helm.sh/hook-delete-policy\":\"hook-succeeded\",\"helm.sh/hook-weight\":\"3\"},\"labels\":{\"app\":\"security\",\"chart\":\"security-1.0.5\",\"heritage\":\"Tiller\",\"release\":\"istio\"},\"name\":\"istio-cleanup-secrets\",\"namespace\":\"istio-system\"},\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"app\":\"security\",\"release\":\"istio\"},\"name\":\"istio-cleanup-secrets\"},\"spec\":{\"containers\":[{\"command\":[\"/bin/bash\",\"-c\",\"kubectl get secret --all-namespaces | grep \\\"istio.io/key-and-cert\\\" |  while read -r entry; do\\n  ns=$(echo $entry | awk '{print $1}');\\n  name=$(echo $entry | awk '{print $2}');\\n  kubectl delete secret $name -n $ns;\\ndone\\n\"],\"image\":\"quay.io/coreos/hyperkube:v1.7.6_coreos.0\",\"name\":\"hyperkube\"}],\"restartPolicy\":\"OnFailure\",\"serviceAccountName\":\"istio-cleanup-secrets-service-account\"}}}}\n"},"labels":{"chart":"security-1.0.5","release":"istio"}},"spec":{"template":{"metadata":{"labels":{"release":"istio"}}}}}
to:
Resource: "batch/v1, Resource=jobs", GroupVersionKind: "batch/v1, Kind=Job"
Name: "istio-cleanup-secrets", Namespace: "istio-system"
Object: &{map["apiVersion":"batch/v1" "kind":"Job" "metadata":map["annotations":map["helm.sh/hook":"post-delete" "helm.sh/hook-delete-policy":"hook-succeeded" "helm.sh/hook-weight":"3" "kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\":{\"annotations\":{\"helm.sh/hook\":\"post-delete\",\"helm.sh/hook-delete-policy\":\"hook-succeeded\",\"helm.sh/hook-weight\":\"3\"},\"labels\":{\"app\":\"security\",\"chart\":\"security-1.0.0\",\"heritage\":\"Tiller\",\"release\":\"RELEASE-NAME\"},\"name\":\"istio-cleanup-secrets\",\"namespace\":\"istio-system\"},\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"app\":\"security\",\"release\":\"RELEASE-NAME\"},\"name\":\"istio-cleanup-secrets\"},\"spec\":{\"containers\":[{\"command\":[\"/bin/bash\",\"-c\",\"kubectl get secret --all-namespaces | grep \\\"istio.io/key-and-cert\\\" |  while read -r entry; do\\n  ns=$(echo $entry | awk '{print $1}');\\n  name=$(echo $entry | awk '{print $2}');\\n  kubectl delete secret $name -n $ns;\\ndone\\n\"],\"image\":\"quay.io/coreos/hyperkube:v1.7.6_coreos.0\",\"name\":\"hyperkube\"}],\"restartPolicy\":\"OnFailure\",\"serviceAccountName\":\"istio-cleanup-secrets-service-account\"}}}}\n"] "creationTimestamp":"2019-03-06T17:31:59Z" "labels":map["app":"security" "chart":"security-1.0.0" "heritage":"Tiller" "release":"RELEASE-NAME"] "name":"istio-cleanup-secrets" "namespace":"istio-system" "resourceVersion":"1596" "selfLink":"/apis/batch/v1/namespaces/istio-system/jobs/istio-cleanup-secrets" "uid":"bf4f1cdb-4035-11e9-99ce-208984866d4f"] "spec":map["backoffLimit":'\x06' "completions":'\x01' "parallelism":'\x01' "selector":map["matchLabels":map["controller-uid":"bf4f1cdb-4035-11e9-99ce-208984866d4f"]] "template":map["metadata":map["creationTimestamp":<nil> "labels":map["app":"security" "controller-uid":"bf4f1cdb-4035-11e9-99ce-208984866d4f" "job-name":"istio-cleanup-secrets" "release":"RELEASE-NAME"] "name":"istio-cleanup-secrets"] "spec":map["containers":[map["command":["/bin/bash" "-c" "kubectl get secret --all-namespaces | grep \"istio.io/key-and-cert\" |  while read -r entry; do\n  ns=$(echo $entry | awk '{print $1}');\n  name=$(echo $entry | awk '{print $2}');\n  kubectl delete secret $name -n $ns;\ndone\n"] "image":"quay.io/coreos/hyperkube:v1.7.6_coreos.0" "imagePullPolicy":"IfNotPresent" "name":"hyperkube" "resources":map[] "terminationMessagePath":"/dev/termination-log" "terminationMessagePolicy":"File"]] "dnsPolicy":"ClusterFirst" "restartPolicy":"OnFailure" "schedulerName":"default-scheduler" "securityContext":map[] "serviceAccount":"istio-cleanup-secrets-service-account" "serviceAccountName":"istio-cleanup-secrets-service-account" "terminationGracePeriodSeconds":'\x1e']]] "status":map["completionTime":"2019-03-06T17:33:59Z" "conditions":[map["lastProbeTime":"2019-03-06T17:33:59Z" "lastTransitionTime":"2019-03-06T17:33:59Z" "status":"True" "type":"Complete"]] "startTime":"2019-03-06T17:31:59Z" "succeeded":'\x01']]}
for: "/snap/microk8s/483/actions/istio/istio-demo.yaml": Job.batch "istio-cleanup-secrets" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"istio-cleanup-secrets", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app":"security", "controller-uid":"bf4f1cdb-4035-11e9-99ce-208984866d4f", "job-name":"istio-cleanup-secrets", "release":"istio"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume(nil), InitContainers:[]core.Container(nil), Containers:[]core.Container{core.Container{Name:"hyperkube", Image:"quay.io/coreos/hyperkube:v1.7.6_coreos.0", Command:[]string{"/bin/bash", "-c", "kubectl get secret --all-namespaces | grep \"istio.io/key-and-cert\" |  while read -r entry; do\n  ns=$(echo $entry | awk '{print $1}');\n  name=$(echo $entry | awk '{print $2}');\n  kubectl delete secret $name -n $ns;\ndone\n"}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar(nil), Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"OnFailure", TerminationGracePeriodSeconds:(*int64)(0xc003271308), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"istio-cleanup-secrets-service-account", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc00357ca10), ImagePullSecrets:[]core.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil), DNSConfig:(*core.PodDNSConfig)(nil), ReadinessGates:[]core.PodReadinessGate(nil), RuntimeClassName:(*string)(nil), EnableServiceLinks:(*bool)(nil)}}: field is immutable
Failed to enable istio

完整的输出可以在https://pastebin.com/v4CAec14找到。

这似乎与已知问题https://github.com/ubuntu/microk8s/issues/414和https://github.com/ubuntu/microk8s/issues/386无关。

我snap在 Ubuntu 18.10 上安装了 stable 1.14 (492) 和 edge 1.14.1 (522) 时遇到了这个问题。

microk8s
  • 1 个回答
  • 564 Views
Martin Hope
Kalle Richter
Asked: 2019-04-05 09:16:15 +0800 CST

如何在 microk8s 上安装 helm 等应用程序?

  • 1

为了helm在 Kubernetes on Google Cloud (gCloud) 上安装应用程序,我从仪表板启动了一个云 shell。如何helm在 microk8s 上做到这一点或以不同的方式安装?

我在 Ubuntu 18.10 上使用 microk8s 1.14。

microk8s
  • 1 个回答
  • 4753 Views
Martin Hope
Kalle Richter
Asked: 2019-04-05 02:09:59 +0800 CST

如何在不更改语言设置的情况下在德语系统上以英语启动 ubuntu 软件?

  • 2

到目前为止,我能够通过使用 value指定环境变量LANGUAGE(有时LANG或)可靠地启动英语应用程序,或者这也是诸如如何更改特定应用程序的语言之类的问题?解释。奇迹般有效。LC_ALLenen_USCenv LANGUAGE=en gedit

但是,ubuntu-software我没有运气。有什么办法可以用英文启动程序。我想用英文编写非常高质量的说明如何使用软件中心(包括按钮和其他控制标签),而无需切换系统语言设置或选择其他一些复杂的方法,例如通过 i18n 源代码。

我正在使用 Ubuntu 18.10。

language
  • 1 个回答
  • 43 Views
Martin Hope
Kalle Richter
Asked: 2019-03-09 00:42:16 +0800 CST

如何访问 micro8ks 的仪表板 Web UI?

  • 10

有关于如何启用仪表板扩展的信息

microk8s.enable dashboard

(我运行)以及如何显示启用的其他扩展的 URL,如下所示:

kubectl cluster-info

如何获取在 Ubuntu 18.10 上本地运行的 microk8s 安装仪表板的 URL?

url kubernetes microk8s
  • 3 个回答
  • 12619 Views
Martin Hope
Kalle Richter
Asked: 2018-11-12 04:12:19 +0800 CST

Launchpad 接受哪些 GNU savannah 错误报告 URL?

  • 4

我报告了https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1800340(通常)没有得到任何反馈,所以我在https://savannah 向上游报告了它。 gnu.org/bugs/?func=detailitem&item_id=55005并希望在 Launchpad 中注册上游问题。不幸的是,该 URL 无法识别,这似乎是 GNU Savannah 提供的不同形式的 URL 的问题(链接中的详细信息),而且是 10 年来贡献工具中的一个分类错误。

因为根据我的经验(报告数百个错误并花费数百小时处理类似问题并听取数百人的痛苦)修复这些错误的变化为零,所以我想解决这个问题:可以我将上游错误 URL 转换为 Launchpad 接受的 URL?有没有人有接受的 GNU Savannah 报告的 URL 表格列表,可以在这里收集并在报告中链接,以允许其他人解决这种问题处理对非全职 Ubuntu 贡献者造成的挫败感?

launchpad bug-reporting upstream url gnu
  • 1 个回答
  • 54 Views
Martin Hope
Kalle Richter
Asked: 2018-08-30 07:24:26 +0800 CST

如果不以交互方式运行,如何从 .bashrc 返回?

  • 3

如果 shell 不是交互式的,我有两个语句要返回~/.bashrc,可能来自两个 Ubuntu 版本,但我无法重建哪个更新(我假设因此更好)并且我对不同方法的效果感兴趣:

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

对比

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
command-line bash bashrc
  • 1 个回答
  • 1531 Views
Martin Hope
Kalle Richter
Asked: 2018-08-22 10:59:03 +0800 CST

挂载单元,在 systemctl 状态下激活 - in 路径,但可用于 Requires in unit

  • 1

我正在观察以下行为,并想知道我是否遗漏了某些东西或遇到了错误:我在一个.mount单元的一个Requires节中指定一个systemd单元。如果路径包含 a -(\\x2d在系统单元和命令中转义),则启动失败:

$ mkdir /tmp/dir /tmp/dir-0 /tmp/dir0
$ sudo mount --bind /tmp/dir /tmp/dir-0

导致sudo systemctl status tmp-dir\\x2d0.mount正确打印

● tmp-dir\x2d0.mount - /tmp/dir-0
   Loaded: loaded (/proc/self/mountinfo)
   Active: active (mounted) since Tue 2018-08-21 20:34:58 CEST; 34s ago
    Where: /tmp/dir-0
     What: /dev/mapper/root-root

然而一个systemd单位test.service包含

[Unit]
Requires=tmp-dir\\x2d0.mount

[Service]
Type=oneshot
ExecStart=/bin/echo "Hello world!"

由于无法启动

> sudo systemctl start test.service 
Failed to start test.service: Unit tmp-dir\\x2d0.mount not found.

如果我/tmp/dir0用作挂载点并调整Requires单元,它工作正常。systemctl daemon-reload已在所有更改之间调用。

我正在使用 Ubuntu 18.04。

mount systemd
  • 1 个回答
  • 756 Views
Martin Hope
Kalle Richter
Asked: 2018-07-22 18:49:48 +0800 CST

为什么在包列表中指定openjdk-8-jdk时openjdk-11-jre和maven一起安装?

  • 8

该软件包maven取决于default-jre-headless (>= 2:1.7) | java7-runtime-headless(根据sudo dpkg -I /var/cache/apt/archives/maven_3.5.2-2_all.deb)。我注意到在 Docker 内运行的 Ubuntu 18.04 上出现以下行为(图片docker:18.04):

apt-get update && apt-get install --yes openjdk-8-jdk
apt-get install --yes maven

安装 OpenJDK 8 JDK(包括 JRE),然后只安装 Maven,因为已经提供了 JRE。然而两者

apt-get update && apt-get install --yes maven openjdk-8-jdk

和

apt-get update && apt-get install --yes openjdk-8-jdk maven

导致安装 OpenJDK 11 JRE,因为它是默认的 JRE。为什么不apt-get install扫描包列表来检查是否提供了依赖项?到目前为止,我会说apt-get通常会这样做,即使我没有找到有关它的信息。

在https://gitlab.com/krichter/maven-enforcer-plugin-docker/pipelines/26241321中提供了命令和结果的概述(项目需要 JDK 8 到maven-enforcer-plugin)。我没有理由相信我的桌面 Ubuntu 18.04 上的行为是不同的。

我正在寻找对所描述场景的解释,也许是对适应包列表解析的配置的提示。这对我来说不是问题,我不需要解决方法。

在我看来,这种行为是次优的,因为它更直观的是,一个包的显式规范满足同一列表中包的依赖关系覆盖了安装隐式默认值的需要。如果您希望同时安装 OpenJDK 8 和 11,您可以在包列表中指定两者。也许其他人有这个想法并提交了增强请求(可能是 Debian 而不是 Ubuntu)。我很高兴这个链接。

package-management dependencies apt
  • 2 个回答
  • 3824 Views
Martin Hope
Kalle Richter
Asked: 2018-07-22 16:53:25 +0800 CST

单击右侧滚动条时如何使gnome-terminal滚动一页?

  • 3

当单击不是滚动条/拇指的右侧滚动条区域时,gnome-terminal它会跳转到输出的相对位置(我启用了无限输出)。

当单击栏上方或下方时,某些应用程序仅向上或向下跳一页/视口高度(当前仅找到 NetBeans 8.2 输出窗口作为示例),这是我正在寻找的行为。

配置文件的滚动首选项全部隐藏滚动条,控制输出或按键滚动并限制与我正在寻找的输出不匹配。

我正在寻找这种精确的行为,没有涉及其他输入设备或 GUI 控件的解决方法。

我正在使用 Ubuntu 18.04。

gnome-terminal scrollbar scrolling
  • 1 个回答
  • 971 Views
Martin Hope
Kalle Richter
Asked: 2018-05-29 07:07:34 +0800 CST

如何在 Ubuntu 18.04/GNOME shell 中禁用屏幕锁定?

  • 4

我缺少使用默认桌面 GNOME shell 在 Ubuntu 18.04 中禁用屏幕锁定的设置。在版本 < 18.04(可能 < 17.10)中,可以在 Unity 仪表板中搜索“锁定”并立即进行设置(4 次击键和 2 次点击)。

我想禁用 VirtualBox VM 中的屏幕锁定,因为主机的屏幕锁定涵盖了通过它实现的对使用的保护。

gnome lock-screen gnome-shell 18.04
  • 2 个回答
  • 2715 Views
Martin Hope
Kalle Richter
Asked: 2018-05-18 11:43:31 +0800 CST

如何列出可用的 GNOME bst 构建?

  • 1

GNOME 构建说明解释了如何构建指定的程序,例如gedit使用bst shell --build core/gedit.bst. 我想大致了解其他可能的程序和我需要指定的前缀(core/在本例中)。

gnome compiling
  • 1 个回答
  • 35 Views
Martin Hope
Kalle Richter
Asked: 2018-05-04 00:19:59 +0800 CST

如何在 MATE 中关闭蓝牙?

  • 2

在 MATE 中,蓝牙似乎是由控制中心控制Bluetooth Adapters的Bluetooth Manager。然而,蓝牙适配器只允许控制可见性,但不能关闭蓝牙,蓝牙管理器列出可用服务并管理连接。

我知道我可以用 关闭蓝牙sudo systemctl stop bluetooth,但桌面必须提供一种方式。

我正在使用 Ubuntu 18.04。

bluetooth mate 18.04
  • 1 个回答
  • 1748 Views
Martin Hope
Kalle Richter
Asked: 2018-04-25 03:47:55 +0800 CST

如何使用 Cinnamon 桌面镜像笔记本电脑和外接显示器?

  • 1

arandr允许相对于彼此安排监视器,但如何镜像屏幕内容(示例用例:使用投影仪进行演示,您想在其中演示网站的使用)。

multiple-monitors monitor external-monitor cinnamon
  • 1 个回答
  • 302 Views
Martin Hope
Kalle Richter
Asked: 2018-02-14 07:23:17 +0800 CST

在哪里报告快照问题?

  • 10

我似乎没有找到任何信息来报告快照问题,即通过snap install而不是系统包管理器安装的应用程序apt-get。

由于 launchpad.net 上的大多数错误报告都被忽略了,但提交仍然有意义,所以我想确保在使用ubuntu-bug或手动在 launchpad.net 上提交错误时,我不会做更绝望的事情。

apport 表示未安装软件包的事实不应该说太多,因为通常需要数年才能升级此工具以反映需求的变化。

launchpad bug-reporting snap
  • 3 个回答
  • 578 Views
Martin Hope
Kalle Richter
Asked: 2018-01-09 06:45:48 +0800 CST

Ubuntu +/- 1000% 的所有软件包中有多少个文件?

  • 1

我正在开发一个后继者,auto-apt它索引包使用的包信息apt并跟踪这些包中包含的文件的 I/O 请求作为程序包装器并自动安装它们。

所以我想知道Ubuntu大概有多少个包(10个就够了),这样我就可以对算法复杂度做一些估计。

原始代码似乎几十年未维护,并且在最后一个知道的地址下无法联系到作者(我写给他〜一年前,但他没有回复)。该程序似乎已在 17.10 被踢出 Ubuntu。此外,代码完全没有注释和测试(请不要那样做!),我需要猜测树状数据结构的目的是什么(可能是一个编程挑战)以及我是否可以只需将其替换为快速的第三方键值实现即可。

apt
  • 2 个回答
  • 271 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve