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

user.dz's questions

Martin Hope
user.dz
Asked: 2020-05-02 21:05:30 +0800 CST

如何禁用快照保留功能以自动删除以前的快照版本?[复制]

  • 2
这个问题在这里已经有了答案:
如何使用单行命令删除禁用(未使用)的快照包? (7 个回答)
去年关闭。

我在虚拟框中使用snapcraft& 。snap我给了它一个 15GB 的图像大小,但它很快就满了。

用磁盘空间分析器验证后,发现大部分空间是 snaps 包占用的。我删除了一些我不需要的核心扩展gnome-3-26。gnome-3-28

但正如您在下面的清单中看到的,snap 保留每个软件包的先前版本作为备份。

我使用这个 vbox 只是为了测试。我想做这样的snap行为,apt所以它只保留当前版本。我不想担心手动清洁它。

如何使 snap 自动删除较旧的软件包版本?

# snap list --all
Name                  Version                Rev    Tracking         Publisher   Notes
core                  16-2.44.3              9066   latest/stable    canonical*  core
core                  16-2.44.1              8935   latest/stable    canonical*  core,disabled
core18                20200427               1754   latest/stable    canonical*  base
core18                20200311               1705   latest/stable    canonical*  base,disabled
gnome-3-34-1804       0+git.2c86692          27     latest/stable    canonical*  -
gnome-calculator      3.34.1+git4.c387feb0   704    latest/stable/…  canonical*  disabled
gnome-calculator      3.36.0+git4.51b0dc05   730    latest/stable/…  canonical*  -
gnome-characters      v3.32.1+git2.3367201   367    latest/stable/…  canonical*  disabled
gnome-characters      v3.32.1+git4.e06f0b2   495    latest/stable/…  canonical*  -
gnome-logs            3.34.0                 93     latest/stable/…  canonical*  -
gnome-logs            3.34.0                 81     latest/stable/…  canonical*  disabled
gnome-system-monitor  3.32.1-3-g0ea89b4922   111    latest/stable/…  canonical*  disabled
gnome-system-monitor  3.32.0-27-g32ed970e06  135    latest/stable/…  canonical*  -
gtk-common-themes     0.1-36-gc75f853        1506   latest/stable    canonical*  -
gtk-common-themes     0.1-30-gd41a42a        1502   latest/stable    canonical*  disabled
lxd                   4.0.1                  14804  latest/stable    canonical*  disabled
lxd                   4.0.1                  14890  latest/stable    canonical*  -
multipass             1.2.0                  2006   latest/stable    canonical*  classic
multipass             1.1.0                  1784   latest/stable    canonical*  disabled,classic
my-snap-name          0.1                    x13    -                -           disabled
my-snap-name          0.1                    x14    -                -           -
snapcraft             3.11                   4282   latest/stable    canonical*  classic
snappy-debug          0.36-snapd2.44+git     464    latest/stable    canonical*  -
snap
  • 1 个回答
  • 428 Views
Martin Hope
user.dz
Asked: 2020-04-24 05:01:53 +0800 CST

有没有列出“本地”包的命令?就像在突触 GUI 中一样

  • 1

我曾经使用 Synaptic 寻找本地软件包。那些本地安装但在当前活动存储库中没有完全匹配的包。正如这篇文章中解释的那样:Synaptic 中的“本地或过时”是什么意思。

在调试未满足的依赖关系问题时,我发现该功能非常有用。虽然我知道如何获取过时软件包列表,但我找不到本地软件包的方法。

那么,是否有任何等效的命令行列出所有本地包?

注意解释我使用的成语。

  • 孤立包:作为依赖项自动安装,然后依赖项被删除。
  • 过时的包:已安装但存储库中没有具有相同(名称、架构)的包。
  • 本地包:已安装但存储库中没有具有相同(名称、架构、版本)的包。

所以我不是指所有已安装的软件包。

测试用例

  1. Synaptic → Menu:Settings → Repositories → Updates: Enable Unsupported Updates (backports) (注意:我将其用作 PPA 示例)
  2. 重新加载包列表
  3. 搜索debhelper,选择它。菜单:Packages → Force Version ...:从 backports 选择并安装版本(通常是最高版本)
  4. Menu:Settings → Repositories → Updates: Disable Unsupported Updates (backports) (注意:我用它作为 PPA 的例子)
  5. 重新加载包列表

现在比较这两个列表:

  1. Synaptic → 侧边栏:状态 → 已安装(本地和过时)

    Synaptic - 本地和过时的软件包

  2. aptitude search '~o'

    user@user-vb:~$ aptitude search '~o'
    i A linux-headers-4.15.0-19                          - Header files related to Linux kernel version 4.15.0        
    i A linux-headers-4.15.0-19-generic                  - Linux kernel headers for version 4.15.0 on 64 bit x86 SMP  
    i A linux-image-4.15.0-19-generic                    - Signed kernel image generic                                
    i A linux-modules-4.15.0-19-generic                  - Linux kernel extra modules for version 4.15.0 on 64 bit x86
    i A linux-modules-extra-4.15.0-19-generic            - Linux kernel extra modules for version 4.15.0 on 64 bit x86
    user@user-vb:~$ 
    
package-management dpkg apt aptitude
  • 3 个回答
  • 1287 Views
Martin Hope
user.dz
Asked: 2017-04-19 03:43:11 +0800 CST

如何为 snap 包设置 PYTHONPATH?

  • 3

我正在尝试打包一个非纯 python 项目。我使用python带有自定义构建/安装脚本的插件。

该项目包含桌面应用程序所需的 2 个 python 包:

  • alfanous(API)
  • alfanous-desktop(Qt PySide GUI)

snapcraft.yaml文件:

name: alfanous
version: "0.7.8"
summary: Alfanous
description: GNU hello prints a friendly greeting.
  This is part of the snapcraft tour at http://snapcraft.io/create/
#confinement: strict
confinement: devmode

apps:
  alfanous-gui:
    command: usr/bin/alfanous-desktop
    #desktop: usr/share/applications/my-app.desktop
  alfanous-cli:
    command: usr/bin/alfanous-console

parts:
  alfanous-git:
    build-packages:
      #- python
      - sqlite3
      - pyside-tools
      - qt4-linguist-tools
      - python-babel
      - qt4-qmake
      - python-setuptools
      #- python-pyparsing
      #- perl
    #plugin: make
    plugin: python
    python-version: python2
    #source: https://github.com/Alfanous-team/alfanous/archive/0.7.8.tar.gz
    source: https://github.com/Alfanous-team/alfanous.git
    source-type: git
    source-depth: 1
    #source-tag: 0.7.8
    build: |
      make build
    install: |
      echo _______#######:$(pwd)
      #make install_api 
      make install_api DESTDIR=$SNAPCRAFT_PART_INSTALL
      make install_desktop DESTDIR=$SNAPCRAFT_PART_INSTALL
    stage-packages:
      - python-pyparsing
      - python-pyside
      #- epydoc
      #- sphinx
      - python-babel
      - python-setuptools
    python-packages:
      - pyparsing
      - pyside
      - babel

snap 包的构建和安装没有错误。但是,如果我尝试运行它:

$ alfanous.alfanous-cli
Traceback (most recent call last):
  File "/snap/alfanous/x3/usr/bin/alfanous-console", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/snap/alfanous/x3/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'alfanous==0.7.29' distribution was not found and is required by the application

我的第一个嫌疑人是 non-complete PYTHONPATH,试图调试:

snap run --shell alfanous.alfanous-cli
env | grep -i python

什么都没有。

两个包都在那里:

$ ls /snap/alfanous/current/usr/lib/python2.7/site-packages/
alfanous                        alfanousDesktop
alfanous-0.7.29-py2.7.egg-info  alfanousDesktop-0.7.29-py2.7.egg-info

我怎样才能PYTHONPATH正确设置?python插件不应该解决这个问题吗?

snapcraft v2.28 Ubuntu 16.04.2 LTS 64Bit

python
  • 1 个回答
  • 1457 Views
Martin Hope
user.dz
Asked: 2017-04-18 05:06:52 +0800 CST

snapcraft构建时如何在上游源代码上应用补丁?

  • 5

我曾经构建 Debian 软件包(被子),它支持在构建过程中应用补丁。补丁存储在debian/patches文件夹中,它们通常用于将尚未提交的修复添加到上游源或添加特定的平台调整。

我的案例是一个需要自定义构建命令的包:

make build; make install_api; make install_desktop

而不是标准方式:

make; make install

目前提出的解决方案是:

  • 修改Makefile和添加default:&install:条目。

snapcraft --no-parallel-build在不修改源的情况下运行时出现的错误:

make install DESTDIR=/home/username/Desktop/sandbox/alfanous-snap/parts/alfanous-git/install
make: *** No rule to make target 'install'.  Stop.
Command '['/bin/sh', '/tmp/tmp_f_u1ktl', 'make', 'install', 
 'DESTDIR=/home/username/Desktop/sandbox/alfanous-snap/parts/alfanous-git/install']'
 returned non-zero exit status 2

那么,有没有办法给 snapcraft build 添加补丁呢?我对任何其他解决方案/解决方法持开放态度。

packaging
  • 2 个回答
  • 1217 Views
Martin Hope
user.dz
Asked: 2016-12-13 02:56:28 +0800 CST

如何手动删除或清除内核包以解决卡住的 APT/DPKG 安装?

  • 0

我最近遇到了一些情况,其中询问者由于某些内核脚本错误而导致 APT 删除操作卡住。

有时很容易解决根本原因。

  • 喜欢touching 几个丢失的文件
  • 删除错误配置

    like:/etc/initramfs/post-update.d/zz-flash-touch-initrd
    residual Boot: "Couldn't find data partition. Spawning adbd"
    安装 ubuntu-touch 包测试 Unity8,电脑无法启动,因为找不到数据分区
    like:empty /etc/kernel/postinst.d/vboxadd
    Ubuntu 16.04 broken kernel packages won't let我使用 apt-get 安装或删除任何东西

但在其他一些极少数情况下,调试很难或很长。特别是对于不可引导的系统或只有恢复 shell 可用。

我将在这里添加一些案例:

  • 处理 Linux 内核包时遇到错误
  • 强制删除不需要的 linux-image-extra* 包
  • 修复损坏的 dpkg 和 apt 包管理器

我已经使用了一个肮脏的解决方案,如下面的回答所述。我会要求一个更干净的解决方法来像 DPKG 那样手动删除内核包?

apt
  • 1 个回答
  • 1208 Views
Martin Hope
user.dz
Asked: 2016-07-10 10:01:11 +0800 CST

无法使用 UEFI 模式启动新安装的 Ubuntu 16.04?

  • 7

我有一台在 BIOS(传统模式)中安装了 Ubuntu 14.04 的笔记本电脑。

sudo dmidecode

BIOS Information
    Vendor: Dell Inc.
    Version: A16
    Release Date: 12/05/2013
...
System Information
    Manufacturer: Dell Inc.
    Product Name: Latitude E6410

我没有升级,而是尝试在 UEFI 模式下安装新的 Xubuntu 16.04。

  • 将 BIOS 引导从 Legacy 切换到 UEFI 并禁用 SATA 的 RAID。

    (SoftRAID/FakeRAID在每次启动时损坏磁盘末尾的 GPT 表备份)

  • 在 UEFI 模式下使用 USB 密钥启动 & 调整大小并将分区表从 MBR 转换为 GPT。

  • 在 UEFI 模式下使用 USB 密钥再次启动并安装 Xubuntu。创建了一个新的引导 EFI (FAT32) 分区。

重新启动时,UEFI 菜单中有一个 Ubuntu 条目,但选择它会引发关于没有启动媒体的 BIOS 错误消息。

尝试了多种方法但没有成功:

  • 引导修复。
  • 将 EFI 分区更改为 FAT16。
  • 重新安装了Xubuntu。

gparted 中的分区

sudo sfdisk -d /dev/sda

label: gpt
label-id: 4A4481B5-0322-411E-8D05-552FBE6189AC
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 976773134

/dev/sda1 : start=     4194304, size=   127924224, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=F1D50A87-ACB2-4868-B1EA-66C3D5223EA4, name="Linux filesystem"
/dev/sda2 : start=   874115072, size=    98463744, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=C96E6320-18EA-40B2-BA46-79FC66407917, name="Linux filesystem"
/dev/sda4 : start=        2048, size=      409600, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=BCB6E471-44F7-4C42-81EC-B276F1D6B6E6, name="EFI"
/dev/sda5 : start=   154339328, size=   715456512, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=AEBBA3F2-F8B6-40C0-ABFE-9F530FC5F641, name="Linux filesystem"
/dev/sda6 : start=   136513536, size=    17825792, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=515C9B77-B282-4007-8F1A-B0C5D908591E, name="Linux swap"
boot
  • 1 个回答
  • 6743 Views
Martin Hope
user.dz
Asked: 2016-06-17 05:14:10 +0800 CST

如何从命令行显示特定布局变体的键盘图表?

  • 8

以前有类似的问题,但在 Ubuntu 16.04 中的解决方案对我不起作用。我是说:

gkbd-keyboard-display -l us,intl

下面的命令有效,但我希望能够指定哪种布局变体,而不仅仅是基本布局或当前布局。

gkbd-keyboard-display -l us
gkbd-keyboard-display -g 1
command-line
  • 1 个回答
  • 1115 Views
Martin Hope
user.dz
Asked: 2016-06-15 03:21:52 +0800 CST

如何在 Python 中编写 Unity 系统指示器?

  • 82

背景:

  • 这不适用于application-indicators而是system-indicators。

    指标布局

    图片来自:https ://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators

  • 目标是在 Greeter/Lock/Ubiquity 屏幕中显示指标系统监视器。有一个解决方法:

    如何将 indicator-sysmonitor 作为登录屏幕上的默认指标

C原始代码:(工作正常)

  • 我已经用 C 语言工作了,请参阅我的另一个问题:

    如何为 Unity 开发系统指标?

    但是,indicator-sysmonitor已经在 Python 中开发了许多其他应用程序指标。我不喜欢开发人员必须将他们的项目移植到 C 或编写 Python-C 代理的想法,如果他们想在欢迎/锁定/普遍性屏幕中显示指示器。相反,让 indicator-sysmonitor 直接从 python 创建一个系统指标将是最好的解决方案(没有变通方法,它将是当前使用 appindicator 的所有 python 项目的通用解决方案)。

Python 代码:(我尝试将 c 代码移植到 python 失败)

  • 我正在努力将其移植到 Python 中。这是我当前不起作用的代码。它确实为菜单和操作创建 DBus 对象。它列在 XFCE 指标插件中。但没有显示在面板上。

    /usr/lib/indicator-test/indicator-test-service

    #!/usr/bin/python2
    
    import os
    import sys
    
    import gi
    from gi.repository import Gio, GLib
    
    APPLICATION_ID = 'local.sneetsher.indicator.test'
    DBUS_MENU_PATH = '/local/sneetsher/indicator/test/desktop'
    DBUS_ACTION_PATH = '/local/sneetsher/indicator/test'
    
    def callback():
        print ok
    
    def quit_callback(notification, loop):
        global connection
        global exported_action_group_id
        global exported_menu_model_id
    
        connection.unexport_action_group (exported_action_group_id)
        connection.unexport_menu_model (exported_menu_model_id)
    
        loop.quit()
    
    def cancel (notification, action, data):
        if action == "cancel":
            print "Cancel"
        else:
            print "That should not have happened (cancel)!"
    
    def bus_acquired(bus, name):
        # menu
        submenu = Gio.Menu()
        submenu.append("Show", "show")
        item = Gio.MenuItem.new(None, "_header")
        item.set_attribute([("x-canonical-type","s","com.canonical.indicator.root")])
        item.set_submenu(submenu)
        menu = Gio.Menu()
        menu.append_item (item)
    
        actions = Gio.SimpleActionGroup.new()
        action1 = Gio.SimpleAction.new("_header", None)
        actions.insert(action1)
        action2 = Gio.SimpleAction.new('show', None)
        actions.insert(action2)
        action2.connect("activate",callback)
    
        global connection
        connection = bus
    
        global exported_action_group_id
        exported_action_group_id = connection.export_action_group(DBUS_ACTION_PATH, actions)
    
        global exported_menu_model_id
        exported_menu_model_id = connection.export_menu_model(DBUS_MENU_PATH, menu)
    
    def setup ():
        #bus connection
        Gio.bus_own_name(Gio.BusType.SESSION, APPLICATION_ID, 0, bus_acquired, None, None)
    
    if __name__ == '__main__':
    
        connection = None
        exported_menu_model_id = 0
        exported_action_group_id = 0
        password = ""
    
        loop = GLib.MainLoop()
        setup ()
    
        loop.run()
    

    local.sneetsher.indicator.test

    [Indicator Service]
    Name=indicator-test
    ObjectPath=/local/sneetsher/indicator/test
    
    [desktop]
    ObjectPath=/local/sneetsher/indicator/test/desktop
    
    [desktop_greeter]
    ObjectPath=/local/sneetsher/indicator/test/desktop
    
    [desktop_lockscreen]
    ObjectPath=/local/sneetsher/indicator/test/desktop
    

    local.sneetsher.indicator.test.service

    [D-BUS Service]
    Name=local.sneetsher.indicator.test
    Exec=/usr/lib/indicator-test/indicator-test-service
    

    90_unity-greeter.gschema.override

    [com.canonical.unity-greeter]
    indicators=['ug-accessibility', 'com.canonical.indicator.keyboard', 'com.canonical.indicator.session', 'com.canonical.indicator.datetime', 'com.canonical.indicator.power', 'com.canonical.indicator.sound', 'local.sneetsher.indicator.test', 'application']
    

问题:

我期待原因,我没有像_header在原始 C 代码中那样创建菜单结构或其元(伪项,如 )。

任何人都可以用 C 语言将此系统指标代码移植到 Python 吗?

unity
  • 2 个回答
  • 3621 Views
Martin Hope
user.dz
Asked: 2015-12-09 05:06:32 +0800 CST

如何调试未满足的依赖项问题?

  • 14

注意可能的重复:

AFAIK,这不是添加 PPA 后如何解决未满足的依赖项的副本?否则,请使用那里的任何答案解决我在下面提到的测试问题来证明这一点。


背景:

我之前遇到过这个问题How to fix installation wine on Ubuntu 14.04.3LTS 64 bit。它是通过对目标包 ( wine) 的所有递归依赖项进行手动/人工审查来解决的。

重现问题(测试用例):

让我们只用 1 个故障包来安静地简化相同的情况。

  1. 在 VirtualBox 上安装全新的 Ubuntu 14.04。
  2. 打开software-properties-gtk并启用backports存储库。
  3. 获取最后的包列表

    sudo apt-get update
    
  4. 运行apt-get -s install wine确认wine可以安装。

  5. libcgmanager0从 backports安装麻烦的包

    $ apt-cache policy libcgmanager0
    libcgmanager0:
      Installed: 0.24-0ubuntu5
      Candidate: 0.24-0ubuntu7.5
      Version table:
         0.39-2ubuntu2~ubuntu14.04.1 0
            100 http://dz.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
         0.24-0ubuntu7.5 0
            500 http://dz.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
         0.24-0ubuntu7.1 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     *** 0.24-0ubuntu5 0
            500 http://dz.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
            100 /var/lib/dpkg/status
    

    强制apt安装libcgmanager0版本0.39-2ubuntu2~ubuntu14.04.1

    sudo apt-get install libcgmanager0=0.39-2ubuntu2~ubuntu14.04.1
    

现在我们在后台遇到与上述问题相同的用户情况,wine 安装失败,依赖未满足,仅显示第一级依赖包。

  • apt-get -s install wine

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     wine : Depends: wine1.6 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  • apt-get -s install wine1.6

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4)
    E: Unable to correct problems, you have held broken packages.
    
  • apt-get -s install wine1.6-i386

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     wine1.6-i386:i386 : Depends: libglu1-mesa:i386 but it is not going to be installed or
                                  libglu1:i386
                         Depends: libgphoto2-6:i386 (>= 2.5.2) but it is not going to be installed
                         Depends: libgphoto2-port10:i386 (>= 2.5.2) but it is not going to be installed
                         Recommends: libsane:i386 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

一个一个地遵循依赖关系是不切实际apt-get install的。

理想的解决方案:

真正的问题在这里

  1. apt无法安装libcgmanager0:i386版本0.39-2ubuntu2~ubuntu14.04.1,因为 backports 存储库的优先级100低于存储库中0.24-0ubuntu7.5的版本updates500
  2. apt无法安装libcgmanager0:i386版本0.24-0ubuntu7.5,因为libcgmanager0:amd64安装了不同的版本0.39-2ubuntu2~ubuntu14.04.1

最快的解决方法是,强制从 backports 安装相同的 i386 版本

sudo apt-get install libcgmanager0:i386=0.39-2ubuntu2~ubuntu14.04.1

或将其 (amd64) 降级到常规存储库中的任何版本

sudo apt-get install libcgmanager0=0.24-0ubuntu7.5

我尝试过的方法/工具:

  • 禁用 PPA 与问题无关。
  • aptitude在交互模式下使用,仅带来具有许多删除( >200 !!!)的解决方案。
  • apt-get install按照依赖树手动使用。不切实际,因为第一级和第二级依赖项没有提出有关冲突的有意义的消息。
  • debfoster可以生成递归依赖项,但仅限于已安装的包。但是wine还没有安装。

主题/我的兴趣:

假设我想在不知道 libcgmanager0软件包问题(或者libcgmanager0:amd64=0.39-2ubuntu2~ubuntu14.04.1已经安装的软件包)的情况下安装 wine。

我正在寻找一种调试方法或一种方法来了解有问题的包的名称并快速了解发生了什么。

  1. 通常如何调试未满足的依赖项问题?

    dpkg//apt中可能有一些新选项aptitude可以跟踪内部依赖项解析器。这可以显示libcgmanager0在它的输出中。

  2. 如果对此没有规范的答案,谁能告诉我一种更好的方法来生成递归依赖项列表或使用更多细节模拟依赖项解析器以帮助解决问题?

    为什么所有的依赖?因为我想一次检查所有包的以下命令的输出。

    • apt-cache policy <all-dependencies>
    • apt-get -s install <all-dependencies>
apt
  • 1 个回答
  • 6746 Views
Martin Hope
user.dz
Asked: 2015-11-14 01:54:16 +0800 CST

迎宾屏幕上的 LightDM 和 SDDM 战斗

  • 2

我前段时间安装了 Kubuntu 15.04。我升级到 15.10,一切顺利,直到我添加ubuntu-desktop使用 Unity DE。

当使用 systemd 启动时,在启动或登录时,所有虚拟终端(TV/TTY)都出现黑屏或白屏,包括 TV7 图形终端。在极少数情况下,lightdm 和 sddm GUI 之间的屏幕闪烁,这就是我如何知道两者都在运行并且可能是这个问题(黑屏)的原因。

它工作正常:当使用 upstart 启动或将 DM 切换回 sddm 时。

  • KDE/sddm Unity/lightdm 之间的屏幕闪烁

    https://youtu.be/xI1fpTyklNo
    https://youtu.be/HpH309GqFcU

  • ps ax | grep dm

     1377 ?        SLsl   0:00 /usr/sbin/lightdm
     1459 tty7     Ssl+   1:10 /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
     1526 ?        Ssl    0:00 /usr/bin/sddm
     1626 ?        SLl    0:00 lightdm --session-child 12 19
     3843 pts/2    S+     0:00 grep --color=auto dm
    
  • systemctl status default.target

    ● graphical.target - Graphical Interface
       Loaded: loaded (/lib/systemd/system/graphical.target; static; vendor preset: enabled)
       Active: active since Fri 2015-11-13 09:46:21 CET; 50min ago
         Docs: man:systemd.special(7)
    
    Nov 13 09:46:21 BlueSkies systemd[1]: Reached target Graphical Interface.
    
  • sudo dpkg-reconfigure lightdm

    Default display manager:
        gdm
      * lightdm
        sddm
        xdm
    
  • ls -l /etc/systemd/system/display-manager.service

    lrwxrwxrwx 1 root root 35 Nov 13 17:26 /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service
    

我不想删除任何 DM,我也想保留 LightDM 作为默认设置。那么,对于 How to set the default DM for this mixed release 15.10 (systemd/upstart) 是否有规范的答案?

如果没有我正在寻找的答案,我可以找到许多类似的问题:

  • 在 Ubuntu 中安装 plasma5 后 lightdm 黑屏
  • lightdm 没有出现
  • kubuntu 15.04 升级:很多问题
  • 启动时没有登录屏幕,在登录并再次注销后工作
  • Dell xps 13 上的双启动 ubunuty/windows 10 分区,请参阅 Palantir 的回答:

    我发现 kubuntu 安装程序无法正确处理全盘加密,所以我安装了 Ubuntu 安装程序,并在稍后添加了 kubuntu-desktop 包。我在使用 LightDM 时遇到了严重的问题(它会在启动后出现并立即消失,而且它不允许我切换 VT),所以我切换到 KDE 的 sddm 及其登录管理器(提示:sudo dpkg-reconfigure lightdm)。

upgrade
  • 1 个回答
  • 8519 Views
Martin Hope
user.dz
Asked: 2015-10-28 12:02:09 +0800 CST

如何为 Unity 开发系统指标?

  • 39

这不是如何创建 Unity 指标的副本?. 我正在寻找系统指示器而不是应用程序指示器。

背景:

从这两个问题:

  • 如何在登录屏幕中添加或操作应用程序/系统指示器?
  • 如何使 indicator-sysmonitor 作为登录屏幕上的默认指示器

我了解到有两种类型的指标:

  • 系统:声音,键盘,应用程序,...(尝试ps ax | grep indicator:)
  • 应用程序:nm-applet、sysmonitor……以及几乎所有在可用的应用程序指示器中列出的应用程序?

所有应用程序指标都由指标应用程序(系统一个)处理/显示。系统指标直接由Unity面板显示。

这两个问题都是关于从登录和锁定屏幕添加/删除指标。第一个是直接设置(在处理系统指标时)。第二个是一个艰难的设置(在处理应用程序指示器时),需要修改锁定屏幕的面板服务源(统一包)和登录屏幕的统一问候源。

对于sysmonitor,对我来说这是解决方法。最好的解决方案是实施系统指示器而不是应用程序指示器。

话题:

  • 系统指标是否有统一的API(最好是:Python,然后是C/C++)?请参考官方文档。

  • 大多数系统指标都是使用 Vala 编程语言编写的。任何人都可以使用 Python 或 C 为系统指标编写小型演示吗?

更新:

我发现很少有链接可以推动:

  • 在应用指标项目页面中,他们列出了用于应用指标的 AppIndicator-0.3 API(C和Python )的链接。

    他们还列出了 Indicate-0.7 API(C和Python)。这是什么?好吧,它是桌面应用程序之间的 DBus 消息传递通道。

  • 另一方面,在系统指标项目页面中,他们提到:

    系统指标 API

    • 使用 libindicate 的消息菜单。
    • 使用 libunity 的声音菜单。
    • 使用 Evolution-Data-Server 的日期/时间指示器

    他们似乎列出了数据 API,而不是像 Evolution-Data-Server 那样的指标开发 API。但不确定libindicate 和libunity。有人使用过这两个库吗?

    尝试apt-cache rdepends libunity9 libindicator7 libindicator3-7查看哪个指标正在中继这些库。

Update2:这是为了让感兴趣的用户保持更新。

从我到目前为止收集的内容来看,以下是可能的解决方案的顺序:

  1. libindicator3-7(高,很多指标都依赖它)

    我在源码中找到了一些测试示例,一些我试过的虚拟指标,可以安装在/usr/lib/indicators3/7/,它们是共享库.so。我可以让它们显示在登录和常规会话中,但不能显示在锁定屏幕中。

    不过有一些测试指标服务,好像是Unity系统的。我还没有尝试过。

  2. libindicator7

    来自与 libindicator3-7 相同的来源,来自 rdepends:

    mate-indicator-applet
    lxpanel-indicator-applet-plugin
    

    它似乎被用来制作面板中指示器的容器。

  3. libunity9(低的)

    暂无研究

unity
  • 2 个回答
  • 3027 Views
Martin Hope
user.dz
Asked: 2015-10-20 05:40:44 +0800 CST

apt-get purge 如何工作?为什么它不能一次删除破损的包裹?

  • 2

我已经尝试按照此处的说明安装 droidcam 来解决另一个问题:Install DroidCam (Wireless Android Webcam) Client In Ubuntu Via PPA

安装失败并出现后脚本错误,完整日志在此处找到。

现在,我想清理它并完全删除它。所以,我跑了sudo apt-get purge droidcam。但令我惊讶的是,我必须运行它 3 次才能完全清理它的安装。

$ sudo apt-get purge droidcam        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic linux-image-3.19.0-15-generic linux-image-extra-3.19.0-15-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  droidcam*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 1,529 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 239094 files and directories currently installed.)
Removing droidcam (1.3-0ubuntu0) ...
rmmod: ERROR: Module v4l2loopback_dc is not currently loaded
dpkg: error processing package droidcam (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for gnome-menus (3.10.1-0ubuntu5) ...
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for mime-support (3.58ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) ...
Errors were encountered while processing:
 droidcam
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo apt-get purge droidcam 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic linux-image-3.19.0-15-generic linux-image-extra-3.19.0-15-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  droidcam
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 1,529 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 239088 files and directories currently installed.)
Removing droidcam (1.3-0ubuntu0) ...

$ sudo apt-get purge droidcam 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic linux-image-3.19.0-15-generic linux-image-extra-3.19.0-15-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  droidcam*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 239087 files and directories currently installed.)
Removing droidcam (1.3-0ubuntu0) ...
Purging configuration files for droidcam (1.3-0ubuntu0) ...
dpkg: warning: while removing droidcam, directory '/opt' not empty so not removed

$ sudo apt-get purge droidcam 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'droidcam' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic linux-image-3.19.0-15-generic linux-image-extra-3.19.0-15-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我想知道的是:

  • 为什么,我需要多次运行它?
  • 怎么样apt-get purge work?我虽然apt-get purge会一次删除所有已安装的文件。

我的第一个期望,可能是 droidcam 没有很好地包装。

apt
  • 1 个回答
  • 3790 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