标签: debian-buster

sys.path 中的 /usr/lib/python37.zip

刚刚快速检查了sys.pathDebian python 3.7Buster:

qxu@debian:~$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print('\n'.join(sys.path))

/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/usr/local/lib/python3.7/dist-packages
/usr/lib/python3/dist-packages
>>>
Run Code Online (Sandbox Code Playgroud)

除第一个条目外,每个条目看起来都不错:

qxu@debian:~$ ll /usr/lib/python37.zip
ls: cannot access '/usr/lib/python37.zip': No such file or directory
Run Code Online (Sandbox Code Playgroud)

我不确定为什么 zip 文件本身可能是sys.path. 不应该sys.path只包含目录吗?

即使 zip 文件有理由成为 的一部分sys.path,为什么不能在物理上找到它呢?

sys.path python-3.x debian-buster

5
推荐指数
0
解决办法
773
查看次数

如何通过终端清除 Debian“Buster”中的剪贴板?

我正在使用Debian“Buster”(版本 10.3)GNOME 桌面版本 3.30.2

有没有办法仅使用终端命令而不安装任何剪贴板管理器来按需清除剪贴板?

感谢您的时间!

linux terminal clipboard debian debian-buster

5
推荐指数
2
解决办法
5725
查看次数

wget 错误:“xyz”的证书不受信任,已过期

我有一台 Debian 10 buster 服务器,是几个相同的硬件/软件配置之一。我使用部署它们的脚本,它们都是相同的。然而,其中之一在使用 wget 时抛出错误:

\n\n
# wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.6.15.tar.xz\n--2020-05-30 12:49:20--  https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.6.15.tar.xz\nResolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.69.165, 2604:1380:1000:8100::1\nConnecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.69.165|:443... connected.\nERROR: The certificate of \xe2\x80\x98mirrors.edge.kernel.org\xe2\x80\x99 is not trusted.\nERROR: The certificate of \xe2\x80\x98mirrors.edge.kernel.org\xe2\x80\x99 has expired.\n
Run Code Online (Sandbox Code Playgroud)\n\n

我做过的事情:

\n\n
    \n
  • 检查 SSL 证书是否有效
  • \n
  • 确认完全相同的命令在其他服务器上也有效
  • \n
  • 检查系统日期,确认正确
  • \n
  • 检查了resolv.conf,8.8.8.8 8.8.4.4的配置与其他相同
  • \n
  • 手动检查名称解析,工作正常
  • \n
  • 重新安装apt-get install --reinstall ca-certificates
  • \n
  • update-ca-certificates --fresh
  • \n
  • c_rehash
  • \n
  • 使用curl,它工作正常,没有错误,显示正确的SSL过期
  • \n
\n\n

据我所知,问题似乎只是 wget 。我不需要解决方法。我需要一个解决方案,以便我有信心该服务器正常运行。

\n

ssl wget ssl-certificate debian-buster

5
推荐指数
1
解决办法
1万
查看次数

python venv 的激活(activate_this.py)无法工作或抛出错误

Soo,我创建了一个小型 Flask 网站,我想将其部署在带有 Apache 2.4 的 Debian 10 服务器上

首先,我按照教程创建了 apache2 conf 文件和 .wsgi 文件。由于效果不佳,我收到错误“ModuleNotFoundError:没有名为“flask”的模块”,因此我设置了一个虚拟环境

python3 -m venv venv
Run Code Online (Sandbox Code Playgroud)

并将我的 .wsgi 更改为

#!/usr/bin/python3
import sys
import logging

activate_this = '/home/bot/Club-Manager/Webinterface/venv/bin/activate_this.py'

with open(activate_this) as file_:
        exec(file_.read(), dict(__file__=activate_this))

logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/home/bot/Club-Manager/Webinterface/")

import app as application

Run Code Online (Sandbox Code Playgroud)

现在我明白了

Failed to exec Python script file '/var/www/html/Webinterface/Webinterface.wsgi'
Exception occurred processing WSGI script '/var/www/html/Webinterface/Webinterface.wsgi'., file "/var/www/html/Webinterface/Webinterface.wsgi", line 8, in <module>, 
exec(file_.read(), dict(__file__=activate_this))
File "<string>", line 28, in <module>
AttributeError: 'str' object has no attribute 'decode'
Run Code Online (Sandbox Code Playgroud)

起初,“activate_this.py”对我来说并不存在,一些研究告诉我只需从我尝试过的 …

debian apache2 flask python-3.x debian-buster

5
推荐指数
1
解决办法
1721
查看次数

Debian 10 - qt.qpa.plugin:即使找到了“”,也无法加载 Qt 平台插件“xcb”

当我运行 R 命令时,出现以下错误:

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)
Run Code Online (Sandbox Code Playgroud)

我已经查看了所有其他回复,并“解决”了此问题的问题,但它们没有为我解决问题,而且我不知道如何为我的特定设备自行解决此问题。

有人可以指导我如何在不使用复杂语言的情况下解决这个问题吗?我不知道任何访问事物的命令,因此尝试使用在线答案非常困难。

这是我在 Pixelbook 上运行的系统信息

在此输入图像描述

这是我运行 rstudio 时的完整输出:

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at …
Run Code Online (Sandbox Code Playgroud)

linux rstudio debian-buster

5
推荐指数
1
解决办法
3388
查看次数

如何在基于 Debian 的镜像 (Dockerfile) 中安装 Node.js 版本 16.xx?(为什么这么难?)

日期: 2021 年 10 月 5 日星期二

Node 10.x于2018-04-24发布(但这是使用 apt-get 时的默认版本)


我需要在运行容器中安装 Python 和 Node.js。我可以使用以下命令在容器中获取最新版本的 python:

FROM python:alpine

或者

FROM python:buster <== 基于 Debian


如何在 Debian 上(在 Docker 容器中)安装最新版本的 node.js (16.10.0)

当我这样做时:

FROM python:buster

RUN apt-get update && \
  apt-get install -y \
    nodejs npm
Run Code Online (Sandbox Code Playgroud)

我得到这些版本的节点:

节点:10.24.0

npm 5.8.0

当在容器中运行时,给出一个关于不再不受支持的长声明。

“apt-get”从中提取的软件包存储库怎么了,它不会安装更高版本的节点(14.x 或更高版本)?


如果我从:

FROM python:alpine

and include these lines
RUN apk -v --no-cache --update add \
    nodejs-current npm
Run Code Online (Sandbox Code Playgroud)

我将获得 Node 16.x版本,这让一切变得简单。我不需要做任何其他事情。

是否有与python:buster等效的东西(基于 Debian)

我真的希望在我的Dockerfile中有一两行代码,而不是一页包含十几个命令的指令来简单地获取图像中的节点。 …

apt-get debian-based node.js dockerfile debian-buster

5
推荐指数
1
解决办法
8481
查看次数

Debian 10 (Buster) 桌面/GUI 速度慢

安装 Debian 10 (Buster) 时,桌面/GUI 应用程序速度很慢。打开应用程序(例如 Firefox、Terminal...)需要很长时间,并且系统根本无法使用。

apt update && apt upgrade
Run Code Online (Sandbox Code Playgroud)

根本没有帮助。显然这是CPU或GPU驱动程序的问题。我在 Intel i5 + Nvidia GTX 版本上安装了 Debian(不确定 GPU 是否也负责这里)。

我能找到的唯一信息是这个,但这并没有解决问题

driver nvidia intel debian-buster

4
推荐指数
1
解决办法
1万
查看次数

update-alternatives:错误:arptables 的替代 /usr/sbin/arptables-legacy 未注册;不设置

我在 Buster 主机上有 Debian 10 (Buster) KVM 来宾计算机。iptables尝试按照Debian wiki在虚拟机上切换到旧版

update-alternatives --set iptables /usr/sbin/iptables-nft
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
update-alternatives --set arptables /usr/sbin/arptables-nft
update-alternatives --set ebtables /usr/sbin/ebtables-nft
Run Code Online (Sandbox Code Playgroud)

虽然其他三个成功,但arptables更新失败并显示消息

update-alternatives: error: alternative /usr/sbin/arptables-legacy for arptables not registered; not setting
Run Code Online (Sandbox Code Playgroud)

有解决方法吗?

如果您好奇,来宾计算机是使用 kubeadm 启动的 Kubernetes (v1.18) 集群的节点。网络插件是Caliconftables除了MetalLB控制器错误之外,一切都可以使用默认设置

 1 reflector.go:125] pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/cache/reflector.go:98: Failed to list *v1.ConfigMap: Get https://10.96.0.1:443/api/v1/namespaces/metallb-system/configmaps?fieldSelector=metadata.name%3Dconfig&limit=500&resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout
Run Code Online (Sandbox Code Playgroud)

当我ping 10.96.0.1从来宾虚拟机时,我得到

PING 10.96.0.1 (10.96.0.1) 56(84) bytes of data. …
Run Code Online (Sandbox Code Playgroud)

debian kvm iptables debian-buster nftables

4
推荐指数
1
解决办法
9268
查看次数

无法连接到 wsl 2 上 debian buster 上的 Docker 守护进程

我正在尝试在 Windows Subsystem for Linux (WSL) 2(在 Windows Home build 19033.1 上运行)上安装 docker。我按照https://learn.microsoft.com/en-us/windows/wsl/wsl2-install上的说明安装了 wsl2 ,并从 Windows 应用商店安装了 debian,即 debian 10 (buster)。它正在 wsl 2 上运行,如下所示:

wsl -l -v
名称状态版本
* Debian 运行 2

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL=" https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

我按照https://linuxconfig.org/how-to-install-docker-on-debian-10-buster-linux上的说明安装 docker:

sudo apt install docker.io
sudo docker run hello-world
docker:无法连接到位于 unix:///var/run/docker.sock 的 Docker 守护进程。docker 守护进程是否正在运行?

查看 docker 是否正在运行:

sudo service docker status
[FAIL] Docker 未运行...失败! …

docker windows-subsystem-for-linux debian-buster wsl-2

3
推荐指数
1
解决办法
2756
查看次数

为什么 OpenJDK 发布的新 Java 8 镜像不再基于 Alpine,而是基于 Debian 10(Buster)?

我浏览通过OpenJDK的发布最新图片:https://hub.docker.com/layers/openjdk/library/openjdk/8u252-jre-slim-buster/images/sha256-01dfdeac537b9d9adcb2399028fba063733a77186c5264e6b059987002c0e48c?context=explore个个switchedt

所有新的 Java 8 镜像都使用基于 Debian 的,是否有任何官方声明表明 OpenJDK 从 Alpine 迁移到 Debian,为什么?

为什么 OpenJDK 发布的新 Java 8 镜像不再基于 Alpine,而是基于 Debian 10(Buster)?

java alpine-linux debian-buster

3
推荐指数
1
解决办法
3163
查看次数