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-712516

Milano's questions

Martin Hope
Milano
Asked: 2021-12-12 05:27:22 +0800 CST

apt 安装 Python 3.10 会破坏 3.8 版本吗?

  • 3

我可以在 Ubuntu 20.04 上安装 Python 3.10apt而不用担心它会破坏 Python 3.8 吗?

我在许多项目中使用 Python 3.8。

我会运行这个:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update 
sudo apt install python3.10

编辑:

仅使用 Python 3.10 virtualenv。

command-line
  • 1 个回答
  • 975 Views
Martin Hope
Milano
Asked: 2019-03-26 05:15:42 +0800 CST

无法检查 SSD 上的 SMART 数据?

  • 1

我正在尝试检查 SMART 数据。我已经Ubuntu 18.04安装在Kingston A1000, M.2 - 480GBSSD上。

我可以检查所有其他磁盘,但这个。

在此处输入图像描述 在此处输入图像描述

milano@milano-PC:~$ sudo hdparm -I /dev/nvme0n1p1

/dev/nvme0n1p1:
 HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

你知道怎么检查吗?

ssd disk hard-drive smart 18.04
  • 1 个回答
  • 12258 Views
Martin Hope
Milano
Asked: 2018-09-27 01:34:59 +0800 CST

无法安装 deb 文件(也通过 GUI 和终端)(Ubuntu 18.04)

  • 1

尝试安装可以正常运行的YouTube To MP3应用程序。Ubuntu 18.04Ubuntu 16.04

当我双击该deb文件时,它会运行GUI安装程序,但是当我单击 时install,它会开始安装,然后停止并没有显示任何错误,但install按钮仍然存在。在此处输入图像描述

所以我尝试手动安装它,但也有错误。我将在这里向您展示我的步骤:

milano@milano-PC:~/Downloads$ sudo dpkg -i youtube-to-mp3-converter3-9-4-64-bit.deb 
[sudo] password for milano: 
Selecting previously unselected package youtube-to-mp3.
(Reading database ... 179031 files and directories currently installed.)
Preparing to unpack youtube-to-mp3-converter3-9-4-64-bit.deb ...
Unpacking youtube-to-mp3 (3.8.4) ...
dpkg: dependency problems prevent configuration of youtube-to-mp3:
 youtube-to-mp3 depends on libqt4-declarative (>= 4:4.8.1-0ubuntu4.6); however:
  Package libqt4-declarative is not installed.
 youtube-to-mp3 depends on libav-tools; however:
  Package libav-tools is not installed.

dpkg: error processing package youtube-to-mp3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 youtube-to-mp3

所以问题是它没有安装依赖项:

milano@milano-PC:~/Downloads$ sudo apt-get install libqt4-declarative
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libqt4-declarative : Depends: libqt4-network (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-script (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-sql (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-xmlpatterns (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqtcore4 (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqtgui4 (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
 youtube-to-mp3 : Depends: libav-tools but it is not installable
                  Recommends: libav-tools-links but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

所以我这样做:

milano@milano-PC:~/Downloads$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  youtube-to-mp3
0 upgraded, 0 newly installed, 1 to remove and 54 not upgraded.
1 not fully installed or removed.
After this operation, 1 434 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 179077 files and directories currently installed.)
Removing youtube-to-mp3 (3.8.4) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...

编辑:

再次尝试安装依赖项:

milano@milano-PC:~/Downloads$ sudo apt-get install libqt4-declarative
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libqt4-declarative : Depends: libqt4-network (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-script (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-sql (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqt4-xmlpatterns (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqtcore4 (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
                      Depends: libqtgui4 (= 4:4.8.7+dfsg-7ubuntu1) but it is not going to be installed
 youtube-to-mp3 : Depends: libav-tools but it is not installable
                  Recommends: libav-tools-links but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

然后,当我再次尝试安装该应用程序时,第一步又发生了。

milano@milano-PC:~/Downloads$ sudo dpkg -i youtube-to-mp3-converter3-9-4-64-bit.deb 
Selecting previously unselected package youtube-to-mp3.
(Reading database ... 179031 files and directories currently installed.)
Preparing to unpack youtube-to-mp3-converter3-9-4-64-bit.deb ...
Unpacking youtube-to-mp3 (3.8.4) ...
dpkg: dependency problems prevent configuration of youtube-to-mp3:
 youtube-to-mp3 depends on libqt4-declarative (>= 4:4.8.1-0ubuntu4.6); however:
  Package libqt4-declarative is not installed.
 youtube-to-mp3 depends on libav-tools; however:
  Package libav-tools is not installed.

dpkg: error processing package youtube-to-mp3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 youtube-to-mp3

你知道该怎么做吗?

编辑

milano@milano-PC:~/Downloads$ sudo apt install libav-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libav-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  ffmpeg:i386 ffmpeg

E: Package 'libav-tools' has no installation candidate
package-management dpkg deb 18.04
  • 1 个回答
  • 650 Views
Martin Hope
Milano
Asked: 2018-07-23 06:16:48 +0800 CST

CPU 频率总是尽可能低的(并且 CPU 使用率很高)

  • 1

最近,我注意到我的电脑很慢(甚至 youtube 视频也不流畅)。

我有acer aspire nitro 5,我的电池可能没电了。

我认为它是由于 CPU 温度高而节流,但事实并非如此:

传感器

在此处输入图像描述

我可以看到 CPU 频率约为 800.000 MHZ,这是可能的最低频率。

处理器

在此处输入图像描述

如您所见,使用率非常高(我启动了 Intellij Idea)

[在此处输入图像描述

我试图手动将 CPU 频率设置为最大值:

sudo cpufreq-set -f `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`

但它返回错误:

设置新值时出错。常见错误: - 您是否拥有适当的管理权限?(超级用户?) - 您请求的调速器是否可用并已修改?- 试图设置无效的政策?- 尝试设置特定频率,但用户空间调控器不可用,例如因为硬件无法设置为特定频率或用户空间调控器未加载?

你知道我该怎么做吗?

performance cpu 16.04
  • 1 个回答
  • 2447 Views
Martin Hope
Milano
Asked: 2017-07-20 23:10:39 +0800 CST

如何自动化我在 VPS 上经常使用的命令?

  • 1

我有一些关于 DigitalOcean VPS 的项目。我经常部署部分代码。几乎每次上传后,我都必须执行多个命令。

例如,如果我更改 Django 模型并添加一些静态文件:

我必须通过 ssh 连接并且:

activate virtualenv
cd to /home/django/project/
python manage.py makemigrations
python manage.py migrate 
python manage.py collectstatic
sudo systemctl daemon-reload
sudo systemctl restart gunicorn
sudo systemctl restart nginx
sudo supervisorctl
restart celery_worker

当然,我不需要每次都使用所有命令。

我想让使用这些命令更舒服。

是否有一些应用程序可以定义这些命令,然后从中选择并执行?

我想到的最接近的事情是创建 shell 脚本,但也许有更好的选择。

我使用PyCharm进行部署。我检查了文档,但没有找到这样的功能,但也许有。

command-line
  • 1 个回答
  • 135 Views
Martin Hope
Milano
Asked: 2017-07-17 08:25:20 +0800 CST

带有 GUI 的 Python 日志查看器?

  • 3

我正在寻找一些python日志查看器,我可以在其中根据日志级别过滤日志。

我只发现了一件事:Logview会很棒,但链接已经失效,而且我在其他任何地方都没有找到它。

你有什么建议?

python
  • 1 个回答
  • 2059 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