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

Rho Phi's questions

Martin Hope
Rho Phi
Asked: 2024-01-08 05:40:15 +0800 CST

如何在 XFCE 中控制 Debian 12 中的笔记本电脑盖子行为

  • 7

我最近在 Lenovo IdeaPad 100s 上安装了 Debian 12 amd64。笔记本电脑的盖子似乎有问题,特别是我没有找到系统应采取的行为的设置位置。

在xfce-power-managergui 中我设置为“不执行任何操作”。当我合上盖子时,系统仍然进入休眠状态。当我重新打开盖子后,它进入一种奇怪的模式,在图形会话中它没有完全摆脱休眠状态。系统仍然“足够清醒”,我可以进入第二次登录(CTRL-ALT-F2)并以文本模式登录并重新启动。

我尝试在其他设置中尝试“不执行任何操作”,但系统总是这样做,就好像xfce-power-manager没有真正设置任何内容一样。我尝试过手动/etc/systemd/logind.conf修改线路

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend

当我发现它的时候,留下完整的评论

...
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
...

重新启动服务后systemctl restart systemd-logind.service,甚至重新启动后,关闭盖子的行为也确实发生了变化。我怀疑systemd-logind在这里做任何事情,因为所有选项都被列为inactive因为systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target 返回

○ sleep.target - Sleep
     Loaded: loaded (/lib/systemd/system/sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ suspend.target - Suspend
     Loaded: loaded (/lib/systemd/system/suspend.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hibernate.target - System Hibernation
     Loaded: loaded (/lib/systemd/system/hibernate.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

○ hybrid-sleep.target - Hybrid Suspend+Hibernate
     Loaded: loaded (/lib/systemd/system/hybrid-sleep.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

此时我想知道哪个程序正在处理盖子..

请注意,如果我使用注销按钮执行任何操作(例如挂起或休眠或睡眠),它会正确执行操作,并且我能够唤醒计算机以恢复工作状态。只有当盖子关闭时我才会看到这个混乱......

systemd
  • 1 个回答
  • 42 Views
Martin Hope
Rho Phi
Asked: 2022-01-27 05:47:00 +0800 CST

libc6 升级后`sudo:账户验证失败,你的账户是否被锁定?` - 在我关闭并从 live CD 修复之前我该怎么办

  • 2

我试图安装一些软件包(apache mariaDB),但我的出现了问题 sudo apt install apache2 mariadb-server apt-transport-https

最后出现了错误

Checking init scripts...
Unpacking libc6:armhf (2.32-4+rpi1) over (2.29-2+rpi1) ...
Setting up libc6:armhf (2.32-4+rpi1) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package libc6:armhf (--configure):
 installed libc6:armhf package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 libc6:armhf
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)
You have new mail in /var/mail/pi

这似乎是一个已知的错误。那时(2021 年 3 月)人们在 4.4.10 左右更新到 gblic2.30 和 libcrypt,我正在更新到 libc62.32 和 libcrypt1:4.4.27,所以我不知道为什么这个 bug 仍然存在(!)

我对这个错误的理解是,我需要在预期该库的位置放置一个链接或文件,例如

ln -s /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 /lib/libcrypto.so.1

唯一的问题是我需要成为 root 才能做到这一点,sudo或者su现在是不可能的,甚至从 ssh 登录也是不可能的!

我读到这里唯一的希望是创建文件或符号链接,或者从 liveCD/USB 引导机器,或者放置保存根文件系统的 SD 卡并手动编辑该部分。

我的问题是:

  • 在我关闭这个树莓派并取出SD卡手动创建链接之前,我仍然可以使用我登录的终端,有什么可以尝试的修复吗?

我强调我不能 sudo ...

sudo apt
  • 1 个回答
  • 1620 Views
Martin Hope
Rho Phi
Asked: 2021-12-18 00:14:01 +0800 CST

为什么 dd 给我的 SD 卡与其来源不同?

  • 0

我有一个 32 Gb SD 卡,上面有我的操作系统(Raspberry Pi OS Buster),我希望使用 standard 进行备份dd,使用sudo dd if=/dev/sdb of=/mnt/toshiba2tb/pi20211217.img bs=1M

源 SD 卡在lsblk --fs

db
├─sdb1      vfat   RECOVERY 796F-5014
├─sdb2
├─sdb5      ext4   SETTINGS 3b129a7c-44fe-4062-8819-2be9ec66edea
├─sdb6      vfat   boot     3830-AECC
└─sdb7      ext4   root     92847503-3b1f-4e22-9fa0-f6794b8fed0c

映像完成后,我将其复制dd到(全新的)新卡上sudo dd if=/mnt/toshiba2tb/pi20211217.img of=/dev/sdb bs=1M,并获得了一个不同的分区表,它甚至无法启动 RPi

sdb
├─sdb1      vfat   RECOVERY 796F-5014
└─sdb2

fdisk确认和报告和荒谬2T的划分......这是怎么回事?

$ sudo fdisk -l /dev/sdb
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite).
Disk /dev/sdb: 29.7 GiB, 31914983424 bytes, 62333952 sectors
Disk model: LRWM04U
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000edc50

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1             8192    3781250    3773059  1.8G  e W95 FAT16 (LBA)
/dev/sdb2          3781251   60751871   56970621 27.2G  5 Extended
/dev/sdb5       4298748546 8593715840 4294967295    2T ff BBT

更多信息来自sudo /sbin/fdisk -l /mnt/toshiba2tb/pi20211217.img

$ sudo /sbin/fdisk -l /mnt/toshiba2tb/pi20211217.img
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite).
Disk /mnt/toshiba2tb/pi20211217.img: 29 GiB, 31104958464 bytes, 60751872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000edc50

Device                          Boot      Start        End    Sectors  Size Id Type
/mnt/toshiba2tb/pi20211217.img1            8192    3781250    3773059  1.8G  e W95 FAT16 (LBA)
/mnt/toshiba2tb/pi20211217.img2         3781251   60751871   56970621 27.2G  5 Extended
/mnt/toshiba2tb/pi20211217.img5      4298748546 8593715840 4294967295    2T ff BBT

我还尝试dd_rescue了一个新的图像文件,它似乎直到最后都没有错误。

$ sudo dd_rescue /dev/sdb /mnt/toshiba2tb/pi20211217.rescue.img
dd_rescue: (info) expect to copy 30375936kB from /dev/sdb
dd_rescue: (info): ipos:  30375936.0k, opos:  30375936.0k, xferd:  30375936.0k
                   errs:      0, errxfer:         0.0k, succxfer:  30375936.0k
             +curr.rate:    10374kB/s, avg.rate:    20375kB/s, avg.load: 21.2%
             >----------------------------------------.<  99%  ETA:  0:00:00
dd_rescue: (info): read /dev/sdb (30375936.0k): EOF
dd_rescue: (info): Summary for /dev/sdb -> /mnt/toshiba2tb/pi20211217.rescue.img:
dd_rescue: (info): ipos:  30375936.0k, opos:  30375936.0k, xferd:  30375936.0k
                   errs:      0, errxfer:         0.0k, succxfer:  30375936.0k
             +curr.rate:        0kB/s, avg.rate:    20312kB/s, avg.load: 21.1%
             >----------------------------------------.<  99%  ETA:  0:00:00

不幸的是,获得的文件仍然显示出损坏的迹象

$ sudo /sbin/fdisk -l /mnt/toshiba2tb/pi20211217.rescue.img
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite).
Disk /mnt/toshiba2tb/pi20211217.rescue.img: 29 GiB, 31104958464 bytes, 60751872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000edc50

Device                                 Boot      Start        End    Sectors  Size Id Type
/mnt/toshiba2tb/pi20211217.rescue.img1            8192    3781250    3773059  1.8G  e W95 FAT16 (LBA)
/mnt/toshiba2tb/pi20211217.rescue.img2         3781251   60751871   56970621 27.2G  5 Extended
/mnt/toshiba2tb/pi20211217.rescue.img5      4298748546 8593715840 4294967295    2T ff BBT

只是为了检查一下,我确实刷新了此映像,它与所有其他映像具有相同的问题,即引导找不到“设置”分区并永远挂在那里...

假设它可能只是一个分区表问题,我已将原始 SD 的分区表转储到使用sfdisk -d /dev/sdb > pi.partitiontable. 它打印出一些明智的东西

$ cat  pi.partitiontable
label: dos
label-id: 0x000edc50
device: /dev/sdb
unit: sectors

/dev/sdb1 : start=        8192, size=     3773059, type=e
/dev/sdb2 : start=     3781251, size=    56970621, type=5
/dev/sdb5 : start=     3784704, size=       65534, type=83
/dev/sdb6 : start=     3850240, size=      147454, type=c
/dev/sdb7 : start=     3997696, size=    56754176, type=83

然后我将此分区表复制到新复制的 SD 卡 $ sudo sfdisk /dev/sdb < pi.partitiontable上

Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Ignoring extra data in partition table 5.
Invalid flag 0xffff of EBR (for partition 5) will be corrected by w(rite).
Checking that no-one is using this disk right now ... OK

Disk /dev/sdb: 29.7 GiB, 31914983424 bytes, 62333952 sectors
Disk model: LRWM04U
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000edc50

Old situation:

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1             8192    3781250    3773059  1.8G  e W95 FAT16 (LBA)
/dev/sdb2          3781251   60751871   56970621 27.2G  5 Extended
/dev/sdb5       4298748546 8593715840 4294967295    2T ff BBT

>>> Script header accepted.                                                                                                                                                                            >>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x000edc50.
/dev/sdb1: Created a new partition 1 of type 'W95 FAT16 (LBA)' and of size 1.8 GiB.
Partition #1 contains a vfat signature.
/dev/sdb2: Created a new partition 2 of type 'Extended' and of size 27.2 GiB.
/dev/sdb3: Created a new partition 5 of type 'Linux' and of size 32 MiB.
/dev/sdb6: Sector 3850240 is already allocated.
Created a new partition 6 of type 'W95 FAT32 (LBA)' and of size 72 MiB.
/dev/sdb7: Sector 3997696 is already allocated.
Created a new partition 7 of type 'Linux' and of size 27.1 GiB.
/dev/sdb8: Done.

New situation:
Disklabel type: dos
Disk identifier: 0x000edc50

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1          8192  3781250  3773059  1.8G  e W95 FAT16 (LBA)
/dev/sdb2       3781251 60751871 56970621 27.2G  5 Extended
/dev/sdb5       3784704  3850237    65534   32M 83 Linux
/dev/sdb6       3852286  3999739   147454   72M  c W95 FAT32 (LBA)
/dev/sdb7       4001788 60751871 56750084 27.1G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

使用此卡,启动会抱怨设置分区已损坏,因此要求重新安装操作系统。这与之前的错误不同,可能是由于(我猜)我从旧卡中取出并复制到新卡上的分区表存在一些错位或轻微不兼容。我仍然想知道这种方法是否可行,也许需要对分区表进行一些调整......

dd sd-card
  • 3 个回答
  • 185 Views
Martin Hope
Rho Phi
Asked: 2021-11-29 14:27:03 +0800 CST

解决生成的中断,这可能是由持有的包裹引起的

  • 0

我已经尝试(真是个傻瓜!)使用dpkg和 armhf .pkg文件在 Debian Stretch 上安装更新版本的 glibc。坦诚之后

sudo dpkg -i libc6_2.28-10_armhf.deb
sudo dpkg -i libssl1.1_1.1.1d-0+deb10u7_armhf.deb

由于未满足依赖关系,我安装失败,这一定导致我的系统状态不一致。

我现在遇到的两个问题:

  1. 在 python 中,如果import ssl我得到:
    • ImportError:/lib/arm-linux-gnueabihf/libc.so.6:未找到版本“GLIBC_2.25”(/usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 需要)
  2. 也apt-get install不再工作了。例如sudo apt-get install gawk抱怨
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.1 (= 1.1.0l-1~deb9u4) but 1.1.1d-0+deb10u7 is to be installed
 libssl1.1 : Depends: libc6 (>= 2.28) but 2.24-11+deb9u4 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我已经尝试过sudo apt --fix-broken install,但没有运气,仍然陷入未满足的依赖关系和中断。

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.1 (= 1.1.0l-1~deb9u4) but 1.1.1d-0+deb10u7 is installed
 libssl1.1 : Depends: libc6 (>= 2.28) but 2.24-11+deb9u4 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

提到这一点held packages让我尝试了 sudo dpkg --remove --pending,但这并没有给出任何输出,也没有改变上述纠结的否决权。

debian apt
  • 1 个回答
  • 2129 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve