date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,621,168,052,000
I was trying to use Ubuntu using Oracle Virtualbox 6.1.2. I cannot make the Ubuntu size full screen. I now have a tiny window with a lot of black background. When I tried inserting guest additions cd image (from Menu -> devices), I got the error message: Could not mount the media (VERR_PDM_MEDIA_LOCKED) And when I tried executing the code sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 in the Ubuntu terminal, I got the error message, Some packages could not be installed. So, how can I increase the present small Ubuntu screen size?
I was able to resolve the issue yesterday by following the YouTube video: https://www.youtube.com/watch?time_continue=267&v=WiYNrx1Grak&feature=emb_logo But, later after several hours, the small screen size problem again resurfaced. The problem was again resolved by installing VirtualBox 6.1.2 Oracle VM VirtualBox Extension Pack from https://www.virtualbox.org/wiki/Downloads. This helped to get access to webcam in the virtual machine as well. But, for some reason, today my virtual machine is not booting. That could be a totally different issue.
How to increase Ubuntu small screen size in Oracle VirtualBox?
1,621,168,052,000
I have a problem with screen blurring on one of my displays. Both of them are connected via DP cable. When I'm scrolling text or there is anything moving on that display, there is a visible blur. I was trying to solve it, trying to fin solution and cannot find any except using xinerama or TwinView, which does not seems to be perfect solution. I'm currently using Linux Mint 19 Mate with Macro and Compton (also tried on fresh installed 18.3 Mate and 19.2 Mate). Displays: 2x Dell U2419H GPU: Nvidia RTX2070 with 430 drivers
Tear/blur is just that the graphics card doesn't keep up with the change in the images to be displayed. Not nice, sure. But I very much doubt any software-based change (unless it is slower changes of stuff to display) will make any difference.
It there any linux system that does not tear or blur on multi display configuration?
1,621,168,052,000
I'm running Linux Mint with MATE. My external HDMI monitors no longer work with my single HDMI port. lspci -v 00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b) Subsystem: Dell Haswell-ULT DRAM Controller Flags: bus master, fast devsel, latency 0 Capabilities: <access denied> Kernel driver in use: hsw_uncore 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b) (prog-if 00 [VGA controller]) Subsystem: Dell Haswell-ULT Integrated Graphics Controller Flags: bus master, fast devsel, latency 0, IRQ 43 Memory at f6c00000 (64-bit, non-prefetchable) [size=4M] Memory at e0000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: i915 Kernel modules: i915 00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b) Subsystem: Dell Haswell-ULT HD Audio Controller Flags: bus master, fast devsel, latency 0, IRQ 47 Memory at f7c34000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel 00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) (prog-if 30 [XHCI]) Subsystem: Dell 8 Series USB xHCI HC Flags: bus master, medium devsel, latency 0, IRQ 40 Memory at f7c20000 (64-bit, non-prefetchable) [size=64K] Capabilities: <access denied> Kernel driver in use: xhci_hcd 00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04) Subsystem: Dell 8 Series HECI Flags: bus master, fast devsel, latency 0, IRQ 44 Memory at f7c3f000 (64-bit, non-prefetchable) [size=32] Capabilities: <access denied> Kernel driver in use: mei_me Kernel modules: mei_me 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04) Subsystem: Dell Ethernet Connection I218-LM Flags: bus master, fast devsel, latency 0, IRQ 41 Memory at f7c00000 (32-bit, non-prefetchable) [size=128K] Memory at f7c3c000 (32-bit, non-prefetchable) [size=4K] I/O ports at f080 [disabled] [size=32] Capabilities: <access denied> Kernel driver in use: e1000e Kernel modules: e1000e 00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04) Subsystem: Dell 8 Series HD Audio Controller Flags: bus master, fast devsel, latency 0, IRQ 46 Memory at f7c30000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel 00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, IRQ 16 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 Memory behind bridge: f7b00000-f7bfffff Capabilities: <access denied> Kernel driver in use: pcieport Kernel modules: shpchp 00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, IRQ 19 Bus: primary=00, secondary=02, subordinate=02, sec-latency=0 Memory behind bridge: f7a00000-f7afffff Capabilities: <access denied> Kernel driver in use: pcieport Kernel modules: shpchp 00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, IRQ 16 Bus: primary=00, secondary=03, subordinate=03, sec-latency=0 I/O behind bridge: 0000e000-0000efff Memory behind bridge: f7000000-f79fffff Prefetchable memory behind bridge: 00000000f0000000-00000000f09fffff Capabilities: <access denied> Kernel driver in use: pcieport Kernel modules: shpchp 00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04) (prog-if 20 [EHCI]) Subsystem: Dell 8 Series USB EHCI Flags: bus master, medium devsel, latency 0, IRQ 21 Memory at f7c3b000 (32-bit, non-prefetchable) [size=1K] Capabilities: <access denied> Kernel driver in use: ehci-pci 00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04) Subsystem: Dell 8 Series LPC Controller Flags: bus master, medium devsel, latency 0 Capabilities: <access denied> Kernel driver in use: lpc_ich Kernel modules: lpc_ich 00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0]) Subsystem: Dell 8 Series SATA Controller 1 [AHCI mode] Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 42 I/O ports at f0d0 [size=8] I/O ports at f0c0 [size=4] I/O ports at f0b0 [size=8] I/O ports at f0a0 [size=4] I/O ports at f060 [size=32] Memory at f7c3a000 (32-bit, non-prefetchable) [size=2K] Capabilities: <access denied> Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04) Subsystem: Dell 8 Series SMBus Controller Flags: medium devsel, IRQ 255 Memory at f7c39000 (64-bit, non-prefetchable) [size=256] I/O ports at f040 [size=32] Kernel modules: i2c_i801 01:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01) Subsystem: Dell SD/MMC Card Reader Controller Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at f7b01000 (32-bit, non-prefetchable) [size=4K] Memory at f7b00000 (32-bit, non-prefetchable) [size=2K] Capabilities: <access denied> Kernel driver in use: sdhci-pci Kernel modules: sdhci_pci 02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73) Subsystem: Intel Corporation Dual Band Wireless-AC 7260 Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at f7a00000 (64-bit, non-prefetchable) [size=8K] Capabilities: <access denied> Kernel driver in use: iwlwifi Kernel modules: iwlwifi inxi -Fx System: Host: jorge-Latitude-E5440 Kernel: 4.15.0-20-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: MATE 1.20.1 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic Machine: Type: Laptop System: Dell product: Latitude E5440 v: 00 serial: <root required> Mobo: Dell model: 03CHJ4 v: A00 serial: <root required> UEFI: Dell v: A21 date: 02/01/2018 Battery: ID-1: BAT0 charge: 40.7 Wh condition: 49.3/66.6 Wh (74%) model: LGC-LGC3.0 DELL NVWGM63 status: Charging CPU: Topology: Dual Core model: Intel Core i5-4210U bits: 64 type: MT MCP arch: Haswell rev: 1 L2 cache: 3072 KiB flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19155 Speed: 998 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 923 2: 899 3: 899 4: 904 Graphics: Device-1: Intel Haswell-ULT Integrated Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.0.5 direct render: Yes Audio: Device-1: Intel Haswell-ULT HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:03.0 Device-2: Intel 8 Series HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 Sound Server: ALSA v: k4.15.0-20-generic Network: Device-1: Intel Ethernet I218-LM vendor: Dell driver: e1000e v: 3.2.6-k port: f080 bus ID: 00:19.0 IF: eno1 state: down mac: 34:e6:d7:10:bb:8f Device-2: Intel Wireless 7260 driver: iwlwifi v: kernel port: f040 bus ID: 02:00.0 IF: wlp2s0 state: up mac: 48:51:b7:06:b2:10 IF-ID-1: docker0 state: down mac: 02:42:58:2f:db:5c Drives: Local Storage: total: 465.76 GiB used: 41.99 GiB (9.0%) ID-1: /dev/sda vendor: Western Digital model: WD5000LPLX-08ZNTT0 size: 465.76 GiB Partition: ID-1: / size: 95.62 GiB used: 41.96 GiB (43.9%) fs: ext4 dev: /dev/sda6 Sensors: System Temperatures: cpu: 50.0 C mobo: 37.0 C sodimm: 37.0 C Fan Speeds (RPM): cpu: 0 Info: Processes: 202 Uptime: 10m Memory: 7.70 GiB used: 1.07 GiB (13.9%) Init: systemd runlevel: 5 Compilers: gcc: 7.3.0 Shell: bash v: 4.4.19 inxi: 3.0.27 xrandr --verbose Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 eDP-1 connected primary 1366x768+0+0 (0x46) normal (normal left inverted right x axis y axis) 309mm x 174mm Identifier: 0x42 Timestamp: 38912 Subpixel: unknown Gamma: 1.0:1.0:1.0 Brightness: 1.0 Clones: CRTC: 0 CRTCs: 0 1 2 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: EDID: 00ffffffffffff004c83415400000000 00160104901f11780a4bc59c57548c27 17505400000001010101010101010101 0101010101018a1b565a500027303020 550035ae1000001a5c12565a50002730 3020550035ae1000001a000000fe0039 335634488031343041540a2000000000 00004121940010000001010a202000e9 scaling mode: Full aspect supported: Full, Center, Full aspect Broadcast RGB: Automatic supported: Automatic, Full, Limited 16:235 audio: auto supported: force-dvi, off, auto, on non-desktop: 0 range: (0, 1) link-status: Good supported: Good, Bad 1366x768 (0x46) 70.500MHz +HSync -VSync *current +preferred h: width 1366 start 1414 end 1446 total 1456 skew 0 clock 48.42KHz v: height 768 start 773 end 778 total 807 clock 60.00Hz 1366x768 (0x47) 47.000MHz +HSync -VSync h: width 1366 start 1414 end 1446 total 1456 skew 0 clock 32.28KHz v: height 768 start 773 end 778 total 807 clock 40.00Hz 1360x768 (0x48) 84.750MHz -HSync +VSync h: width 1360 start 1432 end 1568 total 1776 skew 0 clock 47.72KHz v: height 768 start 771 end 781 total 798 clock 59.80Hz 1360x768 (0x49) 72.000MHz +HSync -VSync h: width 1360 start 1408 end 1440 total 1520 skew 0 clock 47.37KHz v: height 768 start 771 end 781 total 790 clock 59.96Hz 1280x720 (0x4a) 156.125MHz -HSync +VSync DoubleScan h: width 1280 start 1376 end 1512 total 1744 skew 0 clock 89.52KHz v: height 720 start 721 end 724 total 746 clock 60.00Hz 1280x720 (0x4b) 120.750MHz +HSync -VSync DoubleScan h: width 1280 start 1304 end 1320 total 1360 skew 0 clock 88.79KHz v: height 720 start 721 end 724 total 740 clock 59.99Hz 1280x720 (0x4c) 74.500MHz -HSync +VSync h: width 1280 start 1344 end 1472 total 1664 skew 0 clock 44.77KHz v: height 720 start 723 end 728 total 748 clock 59.86Hz 1280x720 (0x4d) 63.750MHz +HSync -VSync h: width 1280 start 1328 end 1360 total 1440 skew 0 clock 44.27KHz v: height 720 start 723 end 728 total 741 clock 59.74Hz 1024x768 (0x4e) 133.475MHz -HSync +VSync DoubleScan h: width 1024 start 1100 end 1212 total 1400 skew 0 clock 95.34KHz v: height 768 start 768 end 770 total 794 clock 60.04Hz 1024x768 (0x4f) 65.000MHz -HSync -VSync h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz v: height 768 start 771 end 777 total 806 clock 60.00Hz 960x720 (0x50) 117.000MHz -HSync +VSync DoubleScan h: width 960 start 1024 end 1128 total 1300 skew 0 clock 90.00KHz v: height 720 start 720 end 722 total 750 clock 60.00Hz 928x696 (0x51) 109.150MHz -HSync +VSync DoubleScan h: width 928 start 976 end 1088 total 1264 skew 0 clock 86.35KHz v: height 696 start 696 end 698 total 719 clock 60.05Hz 896x672 (0x52) 102.400MHz -HSync +VSync DoubleScan h: width 896 start 960 end 1060 total 1224 skew 0 clock 83.66KHz v: height 672 start 672 end 674 total 697 clock 60.01Hz 1024x576 (0x53) 98.500MHz -HSync +VSync DoubleScan h: width 1024 start 1092 end 1200 total 1376 skew 0 clock 71.58KHz v: height 576 start 577 end 580 total 597 clock 59.95Hz 1024x576 (0x54) 78.375MHz +HSync -VSync DoubleScan h: width 1024 start 1048 end 1064 total 1104 skew 0 clock 70.99KHz v: height 576 start 577 end 580 total 592 clock 59.96Hz 1024x576 (0x55) 46.500MHz -HSync +VSync h: width 1024 start 1064 end 1160 total 1296 skew 0 clock 35.88KHz v: height 576 start 579 end 584 total 599 clock 59.90Hz 1024x576 (0x56) 42.000MHz +HSync -VSync h: width 1024 start 1072 end 1104 total 1184 skew 0 clock 35.47KHz v: height 576 start 579 end 584 total 593 clock 59.82Hz 960x600 (0x57) 96.625MHz -HSync +VSync DoubleScan h: width 960 start 1028 end 1128 total 1296 skew 0 clock 74.56KHz v: height 600 start 601 end 604 total 622 clock 59.93Hz 960x600 (0x58) 77.000MHz +HSync -VSync DoubleScan h: width 960 start 984 end 1000 total 1040 skew 0 clock 74.04KHz v: height 600 start 601 end 604 total 617 clock 60.00Hz 960x540 (0x59) 86.500MHz -HSync +VSync DoubleScan h: width 960 start 1024 end 1124 total 1288 skew 0 clock 67.16KHz v: height 540 start 541 end 544 total 560 clock 59.96Hz 960x540 (0x5a) 69.250MHz +HSync -VSync DoubleScan h: width 960 start 984 end 1000 total 1040 skew 0 clock 66.59KHz v: height 540 start 541 end 544 total 555 clock 59.99Hz 960x540 (0x5b) 40.750MHz -HSync +VSync h: width 960 start 992 end 1088 total 1216 skew 0 clock 33.51KHz v: height 540 start 543 end 548 total 562 clock 59.63Hz 960x540 (0x5c) 37.250MHz +HSync -VSync h: width 960 start 1008 end 1040 total 1120 skew 0 clock 33.26KHz v: height 540 start 543 end 548 total 556 clock 59.82Hz 800x600 (0x5d) 81.000MHz +HSync +VSync DoubleScan h: width 800 start 832 end 928 total 1080 skew 0 clock 75.00KHz v: height 600 start 600 end 602 total 625 clock 60.00Hz 800x600 (0x5e) 40.000MHz +HSync +VSync h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz v: height 600 start 601 end 605 total 628 clock 60.32Hz 800x600 (0x5f) 36.000MHz +HSync +VSync h: width 800 start 824 end 896 total 1024 skew 0 clock 35.16KHz v: height 600 start 601 end 603 total 625 clock 56.25Hz 840x525 (0x60) 73.125MHz -HSync +VSync DoubleScan h: width 840 start 892 end 980 total 1120 skew 0 clock 65.29KHz v: height 525 start 526 end 529 total 544 clock 60.01Hz 840x525 (0x61) 59.500MHz +HSync -VSync DoubleScan h: width 840 start 864 end 880 total 920 skew 0 clock 64.67KHz v: height 525 start 526 end 529 total 540 clock 59.88Hz 864x486 (0x62) 32.500MHz -HSync +VSync h: width 864 start 888 end 968 total 1072 skew 0 clock 30.32KHz v: height 486 start 489 end 494 total 506 clock 59.92Hz 864x486 (0x63) 30.500MHz +HSync -VSync h: width 864 start 912 end 944 total 1024 skew 0 clock 29.79KHz v: height 486 start 489 end 494 total 500 clock 59.57Hz 800x512 (0x64) 51.562MHz +HSync +VSync DoubleScan h: width 800 start 800 end 828 total 832 skew 0 clock 61.97KHz v: height 512 start 512 end 514 total 515 clock 60.17Hz 700x525 (0x65) 61.000MHz +HSync +VSync DoubleScan h: width 700 start 744 end 820 total 940 skew 0 clock 64.89KHz v: height 525 start 526 end 532 total 541 clock 59.98Hz 800x450 (0x66) 59.125MHz -HSync +VSync DoubleScan h: width 800 start 848 end 928 total 1056 skew 0 clock 55.99KHz v: height 450 start 451 end 454 total 467 clock 59.95Hz 800x450 (0x67) 48.750MHz +HSync -VSync DoubleScan h: width 800 start 824 end 840 total 880 skew 0 clock 55.40KHz v: height 450 start 451 end 454 total 463 clock 59.82Hz 640x512 (0x68) 54.000MHz +HSync +VSync DoubleScan h: width 640 start 664 end 720 total 844 skew 0 clock 63.98KHz v: height 512 start 512 end 514 total 533 clock 60.02Hz 720x450 (0x69) 53.250MHz -HSync +VSync DoubleScan h: width 720 start 760 end 836 total 952 skew 0 clock 55.93KHz v: height 450 start 451 end 454 total 467 clock 59.89Hz 700x450 (0x6a) 51.750MHz -HSync +VSync DoubleScan h: width 700 start 740 end 812 total 924 skew 0 clock 56.01KHz v: height 450 start 451 end 456 total 467 clock 59.96Hz 700x450 (0x6b) 43.250MHz +HSync -VSync DoubleScan h: width 700 start 724 end 740 total 780 skew 0 clock 55.45KHz v: height 450 start 451 end 456 total 463 clock 59.88Hz 640x480 (0x6c) 54.000MHz +HSync +VSync DoubleScan h: width 640 start 688 end 744 total 900 skew 0 clock 60.00KHz v: height 480 start 480 end 482 total 500 clock 60.00Hz 640x480 (0x6d) 25.175MHz -HSync -VSync h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz v: height 480 start 490 end 492 total 525 clock 59.94Hz 720x405 (0x6e) 22.500MHz -HSync +VSync h: width 720 start 744 end 808 total 896 skew 0 clock 25.11KHz v: height 405 start 408 end 413 total 422 clock 59.51Hz 720x405 (0x6f) 21.750MHz +HSync -VSync h: width 720 start 768 end 800 total 880 skew 0 clock 24.72KHz v: height 405 start 408 end 413 total 419 clock 58.99Hz 684x384 (0x70) 42.625MHz -HSync +VSync DoubleScan h: width 684 start 720 end 788 total 892 skew 0 clock 47.79KHz v: height 384 start 385 end 390 total 399 clock 59.88Hz 684x384 (0x71) 36.125MHz +HSync -VSync DoubleScan h: width 684 start 708 end 724 total 764 skew 0 clock 47.28KHz v: height 384 start 385 end 390 total 395 clock 59.85Hz 680x384 (0x72) 42.375MHz -HSync +VSync DoubleScan h: width 680 start 716 end 784 total 888 skew 0 clock 47.72KHz v: height 384 start 385 end 390 total 399 clock 59.80Hz 680x384 (0x73) 36.000MHz +HSync -VSync DoubleScan h: width 680 start 704 end 720 total 760 skew 0 clock 47.37KHz v: height 384 start 385 end 390 total 395 clock 59.96Hz 640x400 (0x74) 41.750MHz -HSync +VSync DoubleScan h: width 640 start 676 end 740 total 840 skew 0 clock 49.70KHz v: height 400 start 401 end 404 total 415 clock 59.88Hz 640x400 (0x75) 35.500MHz +HSync -VSync DoubleScan h: width 640 start 664 end 680 total 720 skew 0 clock 49.31KHz v: height 400 start 401 end 404 total 411 clock 59.98Hz 576x432 (0x76) 40.810MHz -HSync +VSync DoubleScan h: width 576 start 608 end 668 total 760 skew 0 clock 53.70KHz v: height 432 start 432 end 434 total 447 clock 60.06Hz 640x360 (0x77) 37.250MHz -HSync +VSync DoubleScan h: width 640 start 672 end 736 total 832 skew 0 clock 44.77KHz v: height 360 start 361 end 364 total 374 clock 59.86Hz 640x360 (0x78) 31.875MHz +HSync -VSync DoubleScan h: width 640 start 664 end 680 total 720 skew 0 clock 44.27KHz v: height 360 start 361 end 364 total 370 clock 59.83Hz 640x360 (0x79) 18.000MHz -HSync +VSync h: width 640 start 664 end 720 total 800 skew 0 clock 22.50KHz v: height 360 start 363 end 368 total 376 clock 59.84Hz 640x360 (0x7a) 17.750MHz +HSync -VSync h: width 640 start 688 end 720 total 800 skew 0 clock 22.19KHz v: height 360 start 363 end 368 total 374 clock 59.32Hz 512x384 (0x7b) 32.500MHz -HSync -VSync DoubleScan h: width 512 start 524 end 592 total 672 skew 0 clock 48.36KHz v: height 384 start 385 end 388 total 403 clock 60.00Hz 512x288 (0x7c) 23.250MHz -HSync +VSync DoubleScan h: width 512 start 532 end 580 total 648 skew 0 clock 35.88KHz v: height 288 start 289 end 292 total 299 clock 60.00Hz 512x288 (0x7d) 21.000MHz +HSync -VSync DoubleScan h: width 512 start 536 end 552 total 592 skew 0 clock 35.47KHz v: height 288 start 289 end 292 total 296 clock 59.92Hz 480x270 (0x7e) 20.375MHz -HSync +VSync DoubleScan h: width 480 start 496 end 544 total 608 skew 0 clock 33.51KHz v: height 270 start 271 end 274 total 281 clock 59.63Hz 480x270 (0x7f) 18.625MHz +HSync -VSync DoubleScan h: width 480 start 504 end 520 total 560 skew 0 clock 33.26KHz v: height 270 start 271 end 274 total 278 clock 59.82Hz 400x300 (0x80) 20.000MHz +HSync +VSync DoubleScan h: width 400 start 420 end 484 total 528 skew 0 clock 37.88KHz v: height 300 start 300 end 302 total 314 clock 60.32Hz 400x300 (0x81) 18.000MHz +HSync +VSync DoubleScan h: width 400 start 412 end 448 total 512 skew 0 clock 35.16KHz v: height 300 start 300 end 301 total 312 clock 56.34Hz 432x243 (0x82) 16.250MHz -HSync +VSync DoubleScan h: width 432 start 444 end 484 total 536 skew 0 clock 30.32KHz v: height 243 start 244 end 247 total 253 clock 59.92Hz 432x243 (0x83) 15.250MHz +HSync -VSync DoubleScan h: width 432 start 456 end 472 total 512 skew 0 clock 29.79KHz v: height 243 start 244 end 247 total 250 clock 59.57Hz 320x240 (0x84) 12.587MHz -HSync -VSync DoubleScan h: width 320 start 328 end 376 total 400 skew 0 clock 31.47KHz v: height 240 start 245 end 246 total 262 clock 60.05Hz 360x202 (0x85) 11.250MHz -HSync +VSync DoubleScan h: width 360 start 372 end 404 total 448 skew 0 clock 25.11KHz v: height 202 start 204 end 206 total 211 clock 59.51Hz 360x202 (0x86) 10.875MHz +HSync -VSync DoubleScan h: width 360 start 384 end 400 total 440 skew 0 clock 24.72KHz v: height 202 start 204 end 206 total 209 clock 59.13Hz 320x180 (0x87) 9.000MHz -HSync +VSync DoubleScan h: width 320 start 332 end 360 total 400 skew 0 clock 22.50KHz v: height 180 start 181 end 184 total 188 clock 59.84Hz 320x180 (0x88) 8.875MHz +HSync -VSync DoubleScan h: width 320 start 344 end 360 total 400 skew 0 clock 22.19KHz v: height 180 start 181 end 184 total 187 clock 59.32Hz DP-1 disconnected (normal left inverted right x axis y axis) Identifier: 0x43 Timestamp: 38912 Subpixel: unknown Clones: HDMI-1 CRTCs: 0 1 2 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: Broadcast RGB: Automatic supported: Automatic, Full, Limited 16:235 audio: auto supported: force-dvi, off, auto, on non-desktop: 0 range: (0, 1) link-status: Good supported: Good, Bad HDMI-1 disconnected (normal left inverted right x axis y axis) Identifier: 0x44 Timestamp: 38912 Subpixel: unknown Clones: DP-1 CRTCs: 0 1 2 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: aspect ratio: Automatic supported: Automatic, 4:3, 16:9 Broadcast RGB: Automatic supported: Automatic, Full, Limited 16:235 audio: auto supported: force-dvi, off, auto, on non-desktop: 0 range: (0, 1) link-status: Good supported: Good, Bad cat /etc/linuxmint/info RELEASE=19.1 CODENAME=tessa EDITION="Cinnamon" DESCRIPTION="Linux Mint 19.1 Tessa" DESKTOP=Gnome TOOLKIT=GTK NEW_FEATURES_URL=https://www.linuxmint.com/rel_tessa_cinnamon_whatsnew.php RELEASE_NOTES_URL=https://www.linuxmint.com/rel_tessa_cinnamon.php USER_GUIDE_URL=https://www.linuxmint.com/documentation.php GRUB_TITLE=Linux Mint 19.1 Cinnamon
I reinstalled the drivers, rebooted, and now the two LG monitors work again. sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo ubuntu-drivers autoinstall
HDMI Not detected / HDMI Disconnected
1,543,410,918,000
How can I stop my monitor screen from going to sleep on CentOS 7 Desktop (X Windows) due to inactivity?
Step 1: Go to Settings Step 2: Under Power Saving change Blank screen to Never
How can I prevent a desktop monitor screen from going to sleep when inactive on CentOs 7 Linux?
1,543,410,918,000
I have recently set up Xvfb on Centos 7 machine. It is working absolutely fine. Only problem is that if I quit putty session (remote access) it would keep running Xvfb in background but display will be gone. So next time when I take remote access via putty first I have to type export DISPLAY=:99 again, then I start my tests. How can I make it permanent? I don't see solution to my problem in this thread How to make exported shell variables permanent? Update: .profile contents: export M3_HOME=/home/aditi.a/apache-maven-3.5.4/bin export PATH=$PATH:$M3_HOME export JMETER_HOME=/home/aditi.a/apache-jmeter-5.0/bin export PATH=$PATH:$JMETER_HOME export JAVA_HOME=/usr/java/jdk1.8.0_192-amd64 export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export DISPLAY=:99 echo variables output: $ echo $JAVA_HOME /usr/java/jdk1.8.0_192-amd64 $ echo $M3_HOME /home/adit.a/apache-maven-3.5.4/bin $ echo $DISPLAY $ which shell I am running $ ps -p $$ PID TTY TIME CMD 30678 pts/14 00:00:00 sh
I second what @JigglyNaga said, there is nothing wrong/missing after looking at your .profile file. Only thing I would suggest copy same contents at /home/aditi.a/.profile and .bashrc /root/.profile and .bashrc files
Xvfb: export display permanently
1,543,410,918,000
I have an HP laptop, the reference is Elitebook 840 G3. I'm running on Linux Mint 18 Sarah 32 bits. After several months of usage, everything works like a charm except the dual screen. Every time I plug in a new screen device, the computer completely crashes and I have to do a hard reboot. It happens no matter what display device I use, from typical monitors to overhead devices. The only workaround for me is to close the laptop's lid, wait for the computer to shut down and then plug the VGA cable. But every time I connect other displays while running, it crashes. Any ideas what it could come from?
Ok so I figured it out. I tried un-installing and re-installing the intel driver called xserver-xorg-video-intel and for some reason after rebooting it worked properly. I don't really understand the reasons, but a simple graphic driver re-install works !
Linux Mint crashes when I connect a new screen
1,543,410,918,000
I've been trying to create a shortcut to rotate the display, but the command I put (xrandr --output XWAYLAND0 --rotate left) into the shortcut does not do anything. I opened a terminal and typed it there, nothing happened. Using --verbose shows: [suppboii@yoboi ~]$ xrandr --output XWAYLAND0 --rotate left --verbose screen 0: 320x200 84x52 mm 96.09dpi xrandr -q shows: [suppboii@yoboi ~]$ xrandr -q Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 XWAYLAND0 connected (normal left inverted right x axis y axis) 1366x768 59.80 + I checked access using xhost and got: [suppboii@yoboi ~]$ xhost access control enabled, only authorized clients can connect SI:localuser:root SI:localuser:suppboii I also added to my xorg.conf over at /etc/X11/ the following Option "RandRRotation" "True" and I am currently using the intel Driver, vesa did the same. No success. I am running Fedora 4.14.11-300.fc27 on a ThinkPad T440p with an i5 4200m and Intel Integrated Graphics.
I fixed it by logging into fedora with the option GNOME on Xorg in the login screen after booting.
Rotate screen shortcut on Fedora 27
1,543,410,918,000
I'm using Amazon Linux. I'm running an automated script through Jenkins with this command Xvfb :10 -ac However, if this command has already been run before, I get the error ... (EE) Fatal server error: (EE) Server is already active for display 10 If this server is no longer running, remove /tmp/.X10-lock and start again. (EE) How can I modify the above command to only run if there it was not already invoked before with the given variable?
As the message says, there is a lock file, /tmp/.X10-lock. So modify your script thusly to only execute if the lock does not exist: if [[ ! -f /tmp/.X10-lock ]]; then Xvfb :10 -ac else echo "INFO: $(date) - X Server already running" 1>&2 fi
How can I prevent running "Xvfb :10 -ac" if it has already been run before?
1,543,410,918,000
I have Xubuntu 16.10 LTS. I have put a new (compatible) 2GB RAM into my old Dell Latitude D610. It's been working for about 2-3 weeks, but then it's acting really strange. None of the icons appear like they should. They appear like that piece of paper with the X mark on it, and the panel and menu icons are just gone. Can anyone help?
It appears that one of the Linux Kernels were broken, so that may be the cause. Thank you all for giving your time and effort to help me in my situation!!
What's wrong with my display? [closed]
1,543,410,918,000
Apparently Canonical did something to X that prevents the Nvidia driver to rotate screens (via xrandr or the control panel GUI). This affects all Ubuntu based distros like Mint. To see if this might be the reason to switch to suse, debian, LMDE or arch, could someone on a non-ubuntu based distro confirm that rotating the screen actually works there (like suggested here)?
This was a deliberate limitation of the NVIDIA driver which since has been removed. See: https://unix.stackexchange.com/a/392390/48285
Can you rotate a screen with Nvidia drivers on a non-Ubuntu Linux?
1,543,410,918,000
I am using CentOS 6.5 but cat /etc/issue shows the following Oracle Linux Server release 6.8 Kernel \r on an \m May be I have updated few programs using Oracle repository. After restart, I get the following message on a command prompt. Oracle Linux server release 6.8 lo: Disabled Privacy extensions I could only get the display screen after entering my account details and through startx Please help me rectifying this..!
The run-level 3 is the default when you don't have a graphical environment (X). For a graphical environment, the standard is level 5. To permanently change the init run-level on your system, you should edit /etc/inittab, look for the default run level on a line similar to id:3:initdefault:, and change the 3 to 5. When you reboot it should load X. You can also switch run-levels manually with the telinit command. (To switch to run-level 5: telinit 5.) Note that the run-levels have been established a long time ago and distributions were developed following these standards. This is why your CentOS loads X when you set the run-level to 5.
Graphics display not working on CentOS 6
1,543,410,918,000
I would like to show a tux logo on am335x processor using a fbcon + framebuffer driver. At the moment i have ti-linux 3.14 configured to use DRM and ti,lcdc driver. Also i have devicetree lcd panel node written with usage of tilcdc driver. Is possible to display logo using only ti,lcdc driver or should i use da8xx-fb driver? Or mix usage of these drivers or something?
Here and found some information how to do it other way thanks to psplash https://e2e.ti.com/support/arm/sitara_arm/f/791/t/398816. But this is not solution for my question. It's only a workaround in userspace. I would like to have kernel solution.
Is DRM+ti,lcdc driver capable of showing tux logo when kernel is booting?
1,543,410,918,000
I first noticed an issue I had on Linux Mint using the mate desktop environment. I wasn't able to resolve it, so I thought that switching to a different distro and desktop would be the answer. I'm now using Antergos and the openbox desktop and I've run into the same problem once again. My icons look weird and are showing the wrong colors. They're displaying as shades of pink, red, and white. I noticed this in several areas such as the app icons in the taskbar, icons in my file manager, icons of programs like GIMP, and the window border theme previews in the LXAppearance settings. I've tried several things to try to fix or get around this. I've switched to multiple desktop environments and window managers like fluxbox, icewm, awesome, KDE plasma, and gnome. This issue remains in every single DE and WM. I've also tried changing themes and icon themes and the problem still remains. I'm out of ideas and could really use some help. This has turned my linux desktop into an ugly mess and I really don't want to continue to use it when it's like this. I've included some images of my problem below. https://i.sstatic.net/yDVJA.jpg
I've solved the problem by downgrading llvm-libs and clang to 3.9.0-3 (from 3.9.1-1). Window decorations and most icons a reddish tone
How do I fix the colors of my icons?
1,543,410,918,000
I have a Debian 32 bit machine running a server application. During previous reboot there seems to be some problem with display manager. After boot the display is blank. I am able to SSH to this from other systems and have root access. During boot the display works fine. Can you please tell me how can I reinstall GNOME or display manager or reset these display settings.
I dont,t know what display-manager you use, So this will reinstall your Display-manager and gnome. apt install --reinstall $(cat /etc/X11/default-display-manager | cut -d / -f 4) gnome-session
Debian Wheezy GNOME corrupted after reboot
1,543,410,918,000
I was trying to play a video on my laptop using SSH command from my android phone(JuiceSSH). but the video started playing in bytes in my phone's terminal. the player was VLC player. how can I make it run the movie on the laptop not on my phone terminal.
VLC would be using the X Window System for the pictures. If you have a session running on the laptop, e.g., its desktop, X would be running. From the desktop you can make a connection to X without problem, and use xhost to add your phone to the "computers" which can connect to the X display. Something like this (in a terminal on the laptop): xhost +myphone where myphone is the hostname of your phone. Then in the phone, you would set the DISPLAY variable (if VLC has no suitable command-line option) to point to that X display, e.g, export DISPLAY=mylaptop vlc In the DISPLAY variable, you have to use the screen number (usually 0 for the actual computer), e.g., "mylaptop:0". Further reading: What does this xhost … command do? Xhost (Arch wiki)
Distinguishing between running a process in client terminal or on the server when using SSH [duplicate]
1,543,410,918,000
I recently installed Fedora 22 on a dual-boot with Windows 8 on the other. But, since I installed it, I have had the following problem: When I press my power button to switch it on, the screen just shows black (or navy blue) for some seconds, goes off and then show a dimmer version of the color basically till I switch the system off. It won't work again until I restart a couple of times (2-20). I receive an error once I boot into Fedora: Error:BOOT_IMAGE=/vmlinuz-4.0.7 crashed.
The problem has been solved, It was actually a screen problem(although I still don't understand how shutting down causes it to be more persistent). The connector at the back of the screen us shaky
Why my manufacturer splash screen is not showing? [closed]
1,543,410,918,000
I am trying to display an image using the following: Display someimage.jpeg It returns this: display: unable to open X server `' @ error/display.c/DisplayImageCommand/426. I have been looking at other posts and I have tried the following with no luck: export DISPLAY="0.0"
Apparently your DISPLAY variable is not being recognized. Run Display via: DISPLAY=:0 Display someimage.jpeg If that works, it is an indication your export is not working correctly. Before running the command, what is the output of echo $DISPLAY?
unable to open X server with ImageMagick Mac osx
1,543,410,918,000
I got the following problem: Well, just installed Fedora 19 alongside to my Debian installation. While GNOME Shell is working perfectly fine when running with Debian, there are some strange display errors (e.g. coloured backgrounds of icons; when opening the dash (where all installed applications are listed) the background not only darkens but turns completely black). Some information about the actual machine running now Fedora 19: CPU: AMD Athlon 5050e, GPU: nVidia 7800GT (128 MB GFX RAM), RAM: 2 GB (I assume this is all information that's necessary, if not, please ask in the comments). Has anyone any ideas on how to fix this?
For this card, i should think is nouveau driver. Try the propertary driver in the nvidia page.
How to fix display error with GNOME Shell on Fedora 19?
1,543,410,918,000
I am tired of people looking at my computer display screen when I am using the computer and seeing my secrets and confidential information etc. How do I prevent people peeking over my shoulder from seeing private information I am working on, for example a work document?
3M manufactures a product called Privacy Filter which is a membrane attached to your monitor that will make it visible only for the very specific angle where the user is expected to be. I have never used this device and cannot testify for its effectiveness, but there are several promotional videos and reviews on YouTube demonstrating how it works. http://www.3m.com/3M/en_US/company-us/all-3m-products/~/All-3M-Products/Privacy-Screen-Protectors/Privacy-Products/?N=5002385+8710873+8711017+8725356+3294857497&rt=r3 Other brands make those too, you might want to look into those as well. Other than that, I can only think of VR devices or some sort of software that will shuffle display data in a way that can only be decoded by an active pair of glasses. Technically feasible, but I am not sure someone has already done it.
Hiding information on a physical monitor [closed]
1,543,410,918,000
What is the relation between X server and display? Can multiple X servers run simultaneously on the same display? Can a X server run simultaneously on multiple displays? Thanks.
The display is effectively the X server; there is exactly one display per X server. So multiple X servers can’t run simultaneously on the same display, and an X server can’t run simultaneously on multiple displays. (Strictly speaking, the latter point isn’t correct, but I don’t think there’s an X server which can serve multiple displays.) See the :displaynumber description in the Xserver manpage, and the “Display Names” section of the X manpage.
What is the relation between X server and display?
1,543,410,918,000
I have 2 laptops both using linux mint 20.1 and connected over local network (WiFi). I have a user1@host1 and a user2@host2. I am running ssh server on host2 and client on host1. I want to use host2's display to show the result if I send any command via ssh from host1 to host2. Ex: The command which is used to switch desktop wmctrl -s 2 should change the desktop on host2 or command firefox should start firefox on host2. I don't want to use host1's diplay for the results. Is this possible? I have administrative and physical access on both the computers. What I tried? I saw that the DISPLAY environment variable is not set so tried setting to :0, 127.0.0.1:0 but that doesn't have any effect. Checked many other questions but they are trying to forward the result to their ocal display but I want the result on remote display.
I am running ssh server on host2 and accessing via host1. I want to use host2's display to show the result. The X server on host2 needs to be running. The user you are logged in as needs to have the authorization to use the X server. On most distros (but not all), this is done by having a "magic cookie" in $HOME/.Xauthority. You can accomplish this for example by logging in as the same user you are using for ssh onto host2 from the keyboard. If (1) and (2) are true, you can set export DISPLAY=:0 after you log in with ssh to host2, and then any X programs spawned from this shell will use the display on host2.
Control remote host's display over ssh connection
1,543,410,918,000
From Can I specify an arbitrary `$DISPLAY`? Do not confuse the actual display (your monitor(s)), the X11 server ("display"), and the way it's accessed via sockets or other means: DISPLAY=:0 and DISPLAY=localhost:10 as forwarded via ssh refer to the same display/xserver, the same video card, and the same monitor. $DISPLAY is provided to start a X server. Does $DISPLAY specify a listening socket and a rendering target of the X server at the same time? If yes, how does it manage to specify two different kinds of things? $DISPLAY specifies a socket. For example if $DISPLAY is :40, it corresponds to a port 6040 or a unix domain socket named after 40. Is the socket which $DISPLAY specifies the listening socket of the X server? Is $DISPLAY also supposed to specify a rendering target (i.e. a display device or its emulator on which the X server will render something)? Is it correct that X client <-> X server <-> rendering target and a X client can't communicate with a rendering target directly but indirectly via a X server? Thanks.
A X server is said to be started in a display No. An X server provides a communication endpoint for X clients. X clients choose the server they want to communicate with either through a command line option or through an environment variable. From the view of the client, this is the "display" it uses, therefore the option is often -display, the environment variable is $DISPLAY, and the relevant library functions have "display" in their name. Communication can either be over the network (unsafe, and mostly disabled today), or locally. The unix construct for providing both kinds of endpoints is called "socket" (see man 2 socket). The "display" value codifies (1) the host, (2) a display number that gets mapped to well-known port numbers or unix domain paths (for local communication), (3) the screen number (today mostly 0 by default, because most X servers don't provide multiple screens), in the format hostname_or_address:display_number.screen_number. Many clients can connect to the same "socket" provided by a single server, so Are "socket" addressing a display of a X server (in the first sentence) and "socket" created by a X server and connected to a X client (in the second sentence) the same "socket"? makes no sense. Edit Is it correct that X client <-> X server <-> rendering target and a X client can't communicate with a rendering target directly but indirectly via a X server? Assuming that you mean by "rendering target" "some piece of hardware that can be displayed as graphics on a monitor", then yes, that's essentially correct. However, the X server doesn't somehow communicate with the "rendering target", the X server takes exclusive control of the "rendering target" (usually, a piece of memory on the graphics card that serves as framebuffer, and a piece of hardware that displays the framebuffer on one or several monitors, all abstracted through various driver and kernel layers). Also, that is the situation for the original X protocol. With the advent of OpenGL extensions, what happens is that the X client can use an extension of the X protocol to gain more direct access to the "rendering target" (the kernel driver for the GPU), bypassing the X server. And today most applications use OpenGL to accelerate the graphics... which is why you loose hardware acceleration as soon as an X client connects over the network to an X server on a different machine.
Does `$DISPLAY` specify both a listening socket and a rendering target of a X server at the same time?
1,543,410,918,000
From https://unix.stackexchange.com/a/505644/674 When you're using SSH, you can access the screen you're connected from by using ssh -X or ssh -Y . Programs can perfectly run on a machine and display on another one. So if you run light-locker through SSH on the remote machine, it will lock your local display and not the remote one (just as running gnome-terminal or any other command will run it on the remote machine but display it locally). if you want the screen to lock again, yes, you'll have to restart it, but be careful to restart it from the X session you want to lock, not from ssh. I ssh to a machine, and then want to lock its screen. Could anyone tell me why I failed and what I shall do? Thanks. $ xscreensaver-command -lock xscreensaver-command: warning: $DISPLAY is not set: defaulting to ":0.0". xscreensaver-command: no screensaver is running on display :0.0 $ DISPLAY=:0 xscreensaver-command -lock xscreensaver-command: no screensaver is running on display :0 Not sure how one can tell there is no X server running on the remote host: $ ps -A | grep -i xorg 448 ? 00:00:29 Xorg 605 ? 00:00:27 Xorg 766 tty7 05:19:26 Xorg 2175 ? 00:02:58 Xorg 3343 ? 00:00:24 Xorg 8520 ? 00:00:28 Xorg 12564 ? 00:00:22 Xorg 24655 ? 00:00:13 Xorg 26692 ? 00:00:28 Xorg 26704 ? 00:00:25 Xorg 26852 ? 00:00:29 Xorg 27034 ? 00:00:23 Xorg
You need to learn about the workings of X. You have your local machine LOC and ssh to the remote machine REM. You have two X displays: LOC:0.0 and REM:0.0 . When you run ssh -X REM from LOC you create a new virtual X display on REM which is "REM:10.0" and points back to "LOC:0.0". So when you run a program on REM, its graphics get send to REM:10 and from there to LOC:0.0 where they appear. If you run a VNC server on REM, it will appear as "REM:1.0" (for instance). You can have many different X displays running on the same machine, sending output from applications to different physical or virtual screens. Now while you're connected on REM, if there is a user logged locally, using "REM:0.0", "REM:1.0" or other X displays (VNC are just special X displays) you can display things on this screen through ssh by changing the value of the special variable "DISPLAY". If you connect on the local console of a machine, and run echo $DISPLAY you'll get :0.0 If you connect from LOC to REM with ssh and want to display applications you launch on REM's screen (REM:0.0), change the value of DISPLAY: export DISPLAY=:0.0 Run a program, and it will display on REM screen (if a session is opened by the same user, of course). In your case, there must be an open session on "REM:0.0" which isn't the case. If the session is ran using VNC, it must be "REM:1.0", so to run xscreensaver there you must set DISPLAY accordingly: export DISPLAY=:1.0 xscreensaver xscreensaver-command -lock
How can I lock the screen of a remote machine?
1,543,410,918,000
I want to install Kali Linux (but the issue also appears for Debian). I created a live USB stick with the distribution. When reaching the splash screen I can select live execution and have a live version of Kali linux running without issue. When I select "install" (in graphical or text mode), a black rectangle appears and the installation does not appear to start. However with the speech synthesis, the black rectangle appears but I can hear the voice giving instructions to select the language. I suppose therefore that the problem comes from the display? I tried changing the command by adding nomodeset like in this question but I am not sure how to exactly write the command. The pc is a HP laptop Elitebook 840 G4 with an Intel HD Graphics 620 graphic card. How can I install a linux distribution when facing this issue?
In the boot menu, I was selecting my usb stick. I didn't saw that there was another option called "legacy USB". Selecting that option solved the issue.
Linux installation failure: black rectangle [closed]
1,412,351,566,000
For whatever reasons, I've always used RPM based distributions (Fedora, Centos and currently openSUSE). I have often heard it stated that deb is better than rpm, but when asked why, have never been able to get a coherent answer (usually get some zealous ranting and copious amounts of spittle instead). I understand there may be some historical reasons, but for modern distributions using the two different packaging methods, can anybody give the technical (or other) merits of one vs. the other?
Main difference for a package maintainer (I think that would be 'developer' in Debian lingo) is the way package meta-data and accompanying scripts come together. In the RPM world, all your packages (the RPMs you maintain) are located in something like ~/rpmbuild. Underneath, there is the SPEC directory for your spec-files, a SOURCES directory for source tarballs, RPMS and SRPMS directories to put newly created RPMs and SRPMs into, and some other things that are not relevant now. Everything that has to do with how the RPM will be created is in the spec-file: what patches will be applied, possible pre- and post-scripts, meta-data, changelog, everything. All source tarballs and all patches of all your packages are in SOURCES. Now, personally, I like the fact that everything goes into the spec-file, and that the spec-file is a separate entity from the source tarball, but I'm not overly enthusiastic about having all sources in SOURCES. IMHO, SOURCES gets cluttered pretty quick and you tend to lose track of what is in there. However, opinions differ. For RPMs it is important to use the exact same tarball as the one the upstream project releases, up to the timestamp. Generally, there are no exceptions to this rule. Debian packages also require the same tarball as upstream, though Debian policy requires some tarballs to be repackaged (thanks, Umang). Debian packages take a different approach. (Forgive any mistakes here: I am a lot less experienced with deb's that I am with RPM's.) Debian packages' development files are contained in a directory per package. What I (think to) like about this approach is the fact that everything is contained in a single directory. In the Debian world, it is a bit more accepted to carry patches in a package that are not (yet) upstream. In the RPM world (at least among the Red Hat derivatives) this is frowned upon. See "FedoraProject: Staying close to upstream projects". Also, Debian has a vast amount of scripts that are able to automate a huge portion of creating a package. For example, creating a - simple - package of a setuptool'ed Python program, is as simple as creating a couple of meta-data files and running debuild. That said, the spec-file for such package in RPM format would be pretty short and in the RPM world, too, there's a lot of stuff that is automated these days.
What are the pros/cons of deb vs. rpm?
1,412,351,566,000
Just for fun, I thought I would use this command on my Raspberry Pi running Raspbian: sudo rm -f /bin/rm I thought I could just reinstall coreutils: I was wrong! apt-get install --reinstall coreutils gives an error from dpkg, saying it couldn't remove the package. Compiling from source doesn't work because the Makefile uses rm. How can I get a working rm back?
sudo touch /bin/rm && sudo chmod +x /bin/rm apt-get download coreutils sudo dpkg --unpack coreutils* And never again. Why didn't you use sudo with apt-get? Because the download command doesn't require it: download download will download the given binary package into the current directory. So, unless you are in some directory you can't write, you don't need to use sudo, and it could get problematic later on since you will need root permissions to remove/move the package.
I deleted /bin/rm. How do I recover it?
1,412,351,566,000
I installed Unified Remote using dpkg: dpkg -i urserver.deb How do I uninstall it so I can reinstall from scratch?
First of all you should check if this package is correctly installed in your system and being listed by dpkg tool: dpkg -l '*urserver*' It should have an option ii in the first column of the output - that means 'installed ok installed'. If you'd like to remove the package itself (without the configuration files), you'll have to run: dpkg -r urserver If you'd like to delete (purge) the package completely (with configuration files), you'll have to run: dpkg -P urserver You may check if the package has been removed successfully - simply run again: dpkg -l urserver If the package has been removed without configuration files, you'll see the rc status near the package name, otherwise, if you have purged the package completely, the output will be empty.
How to uninstall a .deb installed with dpkg?
1,412,351,566,000
What are these file formats and how do they differ from the .msi format in Windows? Also what are the pros and cons of these package management schemes?
Files such as .deb and .rpm are more akin to a .zip file. They're a directory tree of files and sub-directories that contain files related to a particular application and/or library of files. Distros The .deb files are meant for distributions of Linux that derive from Debian (Ubuntu, Linux Mint, etc.). The .rpm files are used primarily by distributions that derive from Redhat based distros (Fedora, CentOS, RHEL) as well as by the openSuSE distro. What's special about them? These files have one other special trait that sets them apart from .zip files, in that they can include a specification that contains rules that tell the package manager software running on a system that's installing one of these files to do additional tasks. These tasks would include things such as: creating user accounts on the system creating/modifying configuration files that aren't actually contained in the .deb or .rpm file set ownership/permissions on the files after installation run commands as root on the system that's installing the package dependencies, both formats can include names or packages and/or service names that they require to be present on a system, prior to installation. What about .msi files? .msi files are similar to .deb & .rpm files but likely even more sophisticated. The .msi files are utilized by the Windows Installer and offer additional features such as: GUI Framework generation of uninstall sequences A framework within itself - for use by 3rd party installers Rollbacks Advertisement User Interface etc. I'd suggest taking a look at the various Wikipedia pages on these subjects if you want a more in-depth explanation. References Windows Installer - .msi RPM file format DEB file format
What are .deb and .rpm and how are they different from .msi? [closed]
1,412,351,566,000
I would like to configure ubuntu package via dpkg-reconfigure with all the values supplied via non-interactive mode (in the script). In fact my case is firebird confiiguration (http://www.firebirdsql.org/manual/ubusetup.html), that when using command: sudo dpkg-reconfigure firebird2.5-superclassic -freadline asks me for the 2 values, where answers would be 'Y' and 'newpwd' . Sample output looks like this: sudo dpkg-reconfigure firebird2.5-superclassic -freadline * Firebird 2.5 superclassic server not running Configuring firebird2.5-superclassic ------------------------------------ Accept if you want Firebird server to start automatically. If you only need the Firebird client and there are no databases that will be served by this host, decline. Enable Firebird server? Y Password for firebird 2.5 ------------------------- Firebird has a special user named SYSDBA, which is the user that has access to all databases. SYSDBA can also create new databases and users. Because of this, it is necessary to secure SYSDBA with a password. The password is stored in /etc/firebird/2.5/SYSDBA.password (readable only by root). You may modify it there (don't forget to update the security database too, using the gsec utility), or you may use dpkg-reconfigure to update both. To keep your existing password, leave this blank. Password for SYSDBA: * Starting Firebird 2.5 superclassic server... ...done. * Firebird 2.5 superclassic server already running I've tried here strings via bash script like this: sudo dpkg-reconfigure firebird2.5-superclassic -f readline << EOF Y newpwd EOF However this didn't work for some reason and it asked for the values to be supplied. Any ideas how to feed the required values to script?
You can always use the expect language to automate interaction with a process that expects its input on a tty. I haven't really used it before so I can't really add code here but yours is a typical use case. UPDATE: [Peter Butkovic] I consider pointing me to expect as a right direction, this script I ended with: #!/usr/bin/expect spawn dpkg-reconfigure firebird2.5-superclassic -freadline expect "Enable Firebird server?" send "Y\r" expect "Password for SYSDBA:" send "newpwd\r" # done expect eof
Feeding input values to dpkg-reconfigure in a non-interactive way
1,412,351,566,000
I've seen this message several times whenever someone has a problem installing, upgrading or removing some piece of software, but I wonder, what does it mean, and more importantly, is possible to solve it? (Reading database ... 81657 files and directories currently installed.) Removing mongodb-10gen ... arg: remove invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error processing mongodb-10gen (--remove): subprocess installed pre-removal script returned error exit status 100 invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1) (the above is just an example, not my actual problem)
That message is generic. It just means that the dpkg instance called by apt/apt-get failed for some reason. It doesn't explain why, how, or give hints how to solve it. As a diagnostic message, it is not useful. You need to read the lines before the message (sometimes quite a number of them) to find the real error that prevents you from completing the installation. Yeah, but how do I solve it? There is no single way to solve it. There are so many reasons why this can happen that it's futile to attempt to list them all in a single post. Each and every circumstance is almost unique to that package/environment. But, there's redemption. The fact that you see this message means that probably there is more relevant information in the lines before the message. For illustrative purposes I will use a example: (Reading database ... 81657 files and directories currently installed.) Removing mongodb-10gen ... arg: remove invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error processing mongodb-10gen (--remove): subprocess installed pre-removal script returned error exit status 100 invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1) Now, to find the problem, you need to read backwards: E: Sub-process /usr/bin/dpkg returned an error code (1) doesn't tell me anything useful. So moving on. Errors were encountered while processing: mongodb-10gen just tells me what package have problems. Is useful but not enough. subprocess installed post-installation script returned error exit status 100: this tells me that the script that failed was the postinst, the one executed in post-installation. This will come handy in some situations, but not in this one. dpkg: error while cleaning up: nothing useful here. invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. BINGO! This tells us that invoke-rc.d, a binary that controls the init script in most Debian-like system, failed. It failed because it couldn't find the /etc/init.d/mongodb script. This is bad. We need to create it or copy from somewhere else so it starts working again. Reinstalling the package is also normally an option for file not found errors. In this case, reporting a bug is not necessary because is probable that we were the ones that removed the script, but if you are completely sure you didn't touch the file (a debsums -sla should confirm it) then report a bug. So, what exactly do you need to get help? Ideally, the complete output of the problem. It's also helpful to include the output of sudo dpkg -C and sudo apt-get check, and the output of apt-cache policy package1 package2... where "package1 package2 ..." includes all the packages with problems.
"E: Sub-process /usr/bin/dpkg returned an error code (1) " What does this mean?
1,412,351,566,000
I used this command to add i386 arch: sudo dpkg --add-architecture i386 And then immediately after without installing any packages I tried to remove the i386 arch like so: sudo dpkg --remove-architecture i386 And i got the error: dpkg: error: cannot remove architecture 'i386' currently in use by the database Solutions I have seen so far involve removing i386 packages, I haven't installed any, the ones that are installed are vital to the functioning of the OS. What do I do? EDIT, PLEASE READ THE FOLLOWING TO AVOID DESTROYING YOUR OS: Turns out that 64-bit Linux OSes already include the i386 arch, so the command sudo dpkg --add-architecture i386 didn't really do anything.
From your list, it looks like you just had the 32-bit packages used for Wine. Wine needs a bunch of 32-bit libraries to run 32-bit Windows applications. You won't be able to remove the i386 architecture unless you uninstall the 32-bit Wine. But there's no point in doing this: there's nothing wrong with having the i386 architecture enabled.
dpkg: error: cannot remove architecture 'i386' currently in use by the database
1,412,351,566,000
Where can I find infos about when the unattend updates/upgrades run and what ist done (or IF something was done)? I want to enable the unattended-upgrades (for security updates) on a debian virtual server and, yeah, on my RaspberryPi, too. Do I have to search the /var/log/apt -logs for infos about WHAT was installed and /var/log/syslog about infos WHEN there was an action? I see no CRON entry for when the update-process will run and the configs /etc/apt/apt.conf.d/20auto-upgrades and /etc/apt/apt.conf.d/50unattended-upgrades don't tell me either. Solution (credits to @bahamut): sudo cat /var/log/unattended-upgrades/unattended-upgrades.log 2016-12-22 06:35:26,489 INFO Initial whitelisted packages: 2016-12-22 06:35:26,489 INFO script for unattended-upgrades is executed 2016-12-22 06:35:26,489 INFO allowed sources are: ['origin=Debian,codename=jessie,label=Debian-Security'] 2016-12-22 06:35:35,518 INFO Packages that will be upgraded: libsmbclient libtevent0 libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient winbind 2016-12-22 06:35:35,523 INFO dpkg-protocol written to »/var/log/unattended-upgrades/unattended-upgrades-dpkg.log« 2016-12-22 06:35:52,336 INFO all upgrades installed
Unattended upgrade has its own log-file in /var/log/unattended-upgrades/unattended-upgrades.log. It is policed by anacron. # These lines replace cron's entries 1 5 cron.daily run-parts --report /etc/cron.daily 7 10 cron.weekly run-parts --report /etc/cron.weekly @monthly 15 cron.monthly run-parts --report /etc/cron.monthly Additional information on what was done is located in /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.
Where to find logs/information about unattended-upgrades (apt)?
1,412,351,566,000
I am wondering if it is theoretically possible to build a Linux distro that can both support rpm and debian packages. Are there any distros live out there that support both? And if not is it even possible?
Bedrock Linux does this. Not saying I've done this, or that it is a good idea, but it is being done.
Is it possible to build a Linux distro supporting both RPM and .deb packages?
1,412,351,566,000
Is there a term to refer to the subset of packages that is automatically installed by Debian distribution? I though that it had something to do with packages priorities, but it doesn't seem to be the case, cause there are packages of all the priority levels among the packages installed by default. Also, some of those packages of initial subset have automatically installed flag, e.g. wireless-tools. So they will be automatically removed if packages of the initial subset, depending on them, are manually removed. I wonder, does the installation tool keep only a list of packages to be considered manually installed and installs their dependencies automatically? Answer to the first two questions: After installing the core Debian utilities, Debian installer seems to invoke tasksel to carry out installation "tasks". Among the typical tasks are "standard" task and "laptop" task. From tasksel page: "standard" task The standard task is a special task used by Debian Installer. It actually relies on the packages' priority. What does the "standard system" task include? tasksel --task-packages standard which is an aptitude search string that equates to aptitude search ~pstandard ~prequired ~pimportant -F%p So tasksel installs standard, required and important packages. "laptop" task The laptop task is a special task use by Debian Installer, to pull the packages useful on a laptop: wireless-tools acpi-support cpufrequtils acpi wpasupplicant powertop acpid apmd pcmciautils pm-utils anacron avahi-autoipd bluetooth Desktop See https://wiki.debian.org/DebianDesktop/Tasks
The base system is described in Debian policy as all packages with required or important priority. You can search for the packages that the required and important priorities are attached to with the aptitude utility. aptitude search ~prequired -F"%p" aptitude search ~pimportant -F"%p" debootstrap installs these packages during the setup process. tasksel will then install whatever other roles you choose on top, normally standard is the default selection that is used. On top of what is listed in the base system you will get A Kernel (thankfully) Input/Locale/Dictionary packages. Hardware packages. (ACPI, USB, PCI, Virtual guest additions on vm's) Then some dependent libraries to support the above. This amounts to about 60 packages on my VirtualBox VM (without the VBox guest additions which pull in a lot of dependencies). Run the Expert Install (select "Advanced options > Expert") if you get a chance. It gives you a better idea of the step by step install process and when apt is being run outside of the base install.
What packages are installed by default in Debian? Is there a term for that set? Why some of those packages are `automatically installed` and some not?
1,412,351,566,000
I am trying to set up a staging environment in a VM, in order to test updates before applying them to my main system. In order to do so, I have done a basic installation of Debian Wheezy (same as on the main system) in the VM, then ran as root from within the VM: # dpkg --clear-selections # dpkg --add-architecture i386 # apt-get update # ssh me@main-system 'dpkg --get-selections | grep -v deinstall' | \ dpkg --set-selections The i386 architecture is unfortunately needed in my case; the system is amd64 native. The problem is with dpkg --set-selections run in the VM. I do have some packages that require special handling (those are actually the main reason why I want a staging environment in the first place) but when I run the last command above, I get about a gazillion lines of output like: dpkg: warning: package not in database at line NNN: package-name for packages that really should be available in the base system. Examples include xterm, yelp and zip. Now for my question: What is the specific process for transferring the package selection list from one Debian system to another (assuming same Debian release level, in Wheezy) and then subsequently applying those changes? The goal is that both have the same list of installed packages, ideally such that doing a diff between the outputs of dpkg --get-selections or dpkg --list on the two comes back showing no differences. The grep -v deinstall part is borrowed from Prevent packages from being removed after doing dpkg --set-selections over on Ask Ubuntu. I have changed the source in the VM to be the same as on the main system, also installing apt-transport-https: deb https://ftp-stud.hs-esslingen.de/debian/ wheezy main non-free deb-src https://ftp-stud.hs-esslingen.de/debian/ wheezy main non-free deb https://ftp-stud.hs-esslingen.de/debian/ wheezy-updates main non-free deb-src https://ftp-stud.hs-esslingen.de/debian/ wheezy-updates main non-free deb [arch=amd64] http://archive.zfsonlinux.org/debian wheezy main Looking at the --set-selections output, I'm seeing: dpkg: warning: package not in database at line 1: a2ps dpkg: warning: package not in database at line 1: abiword dpkg: warning: package not in database at line 1: abiword-common dpkg: warning: package not in database at line 1: abiword-plugin-grammar dpkg: warning: package not in database at line 1: abiword-plugin-mathview dpkg: warning: package not in database at line 1: accountsservice dpkg: warning: package not in database at line 1: acl dpkg: warning: package not in database at line 4: aglfn dpkg: warning: package not in database at line 4: aisleriot dpkg: warning: package not in database at line 4: alacarte dpkg: warning: package not in database at line 4: alien ... The line numbers looked odd, and the corresponding portion of the output of --get-selections is: a2ps install abiword install abiword-common install abiword-plugin-grammar install abiword-plugin-mathview install accountsservice install acl install acpi-support-base install acpid install adduser install aglfn install aisleriot install alacarte install alien install Notice that in between acl and aglfn are acpi-support-base, acpid and adduser for which no errors are being reported. It seems that the packages for which errors are being reported are either un according to dpkg -l, or dpkg -l doesn't have any idea at all about them (dpkg-query: no packages found matching ...). I know there are some locally installed packages, but not many. i386 doesn't figure until gcc-4.7-base:i386 install much farther down the list (line 342 in the --get-selections output).
To clone a Debian installation, use the apt-clone utility. It's available (as a separate package, not part of the default installation) in Debian since wheezy and in Ubuntu since 12.04. On the existing machine, run apt-clone clone foo This creates a file foo.apt-clone.tar.gz. Copy it to the destination machine, and run apt-get install apt-clone apt-clone restore foo.apt-clone.tar.gz If you're working with an old system where apt-clone isn't available, or if you just want to replicate the list of installed packages but not any configuration file, here are the manual steps. On the source machine: cat /etc/apt/sources.list /etc/apt/sources.list.d >sources.list dpkg --get-selections >selections.list apt-mark showauto >auto.list On the target machine: cp sources.list /etc/apt/ apt-get update /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/ dpkg --set-selections <selections.list apt-get dselect-upgrade xargs apt-mark auto <auto.list I believe that you're affected by an incompatible change in dpkg that first made it into wheezy. See bug #703092 for background. The short story is that dpkg --set-selections now only accepts package names that are present in the file /var/lib/dpkg/status or /var/lib/dpkg/available. If you only use APT to manage packages, like most people, then /var/lib/dpkg/available is not kept up-to-date. After running apt-get update and before running dpkg --set-selections and apt-get -u dselect-upgrade, run the following command: apt-cache dumpavail >/tmp/apt.avail dpkg --merge-avail /tmp/apt.avail From jessie onwards, you can simplify this to apt-cache dumpavail | dpkg --merge-avail Alternatively, run /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/ or even simpler apt-get install dctrl-tools sync-available Another simple method that doesn't require installing an additional package but will download the package lists again is dselect update See the dpkg FAQ for more information. (This is mentioned in the dpkg man page, but more in a way that would remind you of the issue if you were already aware, not in a way that explains how to solve the problem!) Note that cloning a package installation with dpkg --set-selections doesn't restore the automatic/manual mark in APT. See Restoring all data and dependencies from dpkg --set-selections '*' for more details. You can save the marks on the source system with apt-mark showauto >auto.list and restore them on the target system with xargs apt-mark auto <auto.list
How do I replicate installed package selections from one Debian system to another? (Debian Wheezy)
1,412,351,566,000
When you upgrade or reinstall a package with dpkg (and ultimately anything that uses it, like apt-get etc) it backs up the existing files by creating a hard link to the file before replacing it. That way if the unpack fails it can easily put back the existing files. That's great, since it protects the operating system from Bad Things™ happening. Except... it only works if your filesystem supports hard links. Not all filesystems do - such as FAT filesystems. I am working on a distribution of Debian for a specific embedded ARM platform, and the boot environment requires that certain files (the kernel included) are on a FAT filesystem so the boot code is able to locate and load them. When you go to upgrade the kernel package (or any other package that has files in that FAT partition) the install fails with: dpkg: error processing archive linux-image3.18.11+_3.18.11.2.armadillian_armhf.deb (--install): unable to make backup link of `./boot/vmlinuz-3.18.11+' before installing new version: Operation not permitted And the whole upgrade fails. I have scoured the web, and the only references I can find are specific people with specific problems when doing specific upgrades, the answer to which is usually "Delete /boot/vmlinuz-3.18.11+ and try again", and yes, that fixes that specific problem. But that's not the answer for me. I am an OS distributor, not an OS user, so I need a way to fix this that doesn't involve the end user manually deleting their kernel files before doing an upgrade. I need a way to tell dpkg to "copy, not hard link" for files on /boot (or all files for all I care, though that would slow down the upgrade operation somewhat), or better yet "If a hard link fails, don't complain, just copy it instead". I have tried such things as the --force-unsafe-io and even --force-all flags to dpkg, but nothing has any effect.
The behaviour you're seeing is implemented in archives.c in the dpkg source, line 1030 (for version 1.18.1): debug(dbg_eachfiledetail, "tarobject nondirectory, 'link' backup"); if (link(fnamevb.buf,fnametmpvb.buf)) ohshite(_("unable to make backup link of '%.255s' before installing new version"), ti->name); It seems to me that you could handle the link failure by falling back to the rename behaviour used lines 1003 and following; something like (this is untested): debug(dbg_eachfiledetail, "tarobject nondirectory, 'link' backup"); if (link(fnamevb.buf,fnametmpvb.buf)) { debug(dbg_eachfiledetail,"link failed, nonatomic"); nifd->namenode->flags |= fnnf_no_atomic_overwrite; if (rename(fnamevb.buf,fnametmpvb.buf)) ohshite(_("unable to move aside '%.255s' to install new version"), ti->name); } I'm not a dpkg expert though... (And there's no option already available in dpkg to provide this behaviour.)
dpkg replacing files on a FAT filesystem
1,412,351,566,000
Is there a way to list all non-free and contrib software installed in Debian via apt? /etc/apt/sources.list is as follows deb http://ftp.us.debian.org/debian/ wheezy main non-free contrib deb-src http://ftp.us.debian.org/debian/ wheezy main non-free contrib deb http://security.debian.org/ wheezy/updates main non-free contrib deb-src http://security.debian.org/ wheezy/updates main non-free contrib # wheezy-updates, previously known as 'volatile' deb http://ftp.us.debian.org/debian/ wheezy-updates main deb-src http://ftp.us.debian.org/debian/ wheezy-updates main I added non-free and contrib years ago because I needed a non-free driver for my video-card, which has now been replaced with a new one that doesn't require a non-free driver. I'd like to get rid of the non-free stuff, but I'm afraid I might have installed other non-free software over the years which I cannot afford to uninstall.
dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-free aptitude search '~i ?section(non-free)' Section will be non-free/... for everything from the non-free path. [Note] for gcc docs... This documentation is licensed under the terms of the GNU Free Documentation License, and contains invariant sections, so it can't be part of Debian main. (I wondered about that too, but didn't bother checking until it was mentioned.)
List all software installed from particular component (non-free, contrib)
1,412,351,566,000
We have the unattended-upgrades package upgrading our servers with security upgrades every Monday and it works great. Today though, it upgraded all of our servers with a new version of PHP5. Because we have moved the default PHP5-FPM configuration file, apt complains that the file has been moved, and what would we like to do (Install new version, keep old version, show differences, start shell) about it. Since unattended-upgrades didn't know how to deal with this, it just aborted and we were left with dozens of machines down until PHP5-FPM was restarted by monitoring. So the question is - How can we make sure unattended-upgrades can handle this situation when it happens next time? We'd like to keep our currently installed version always. I tried googling but came up empty.
I also want to keep original config files while doing automatic updates. You can add the following to /etc/apt/apt.conf.d/50unattended-upgrades Dpkg::Options { "--force-confdef"; "--force-confold"; }; See here for a good explanation of the options: http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/
Unattended upgrades and modified configuration files
1,412,351,566,000
I'm running Debian, namely: # uname -A Linux martlins2 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux and for some time I see some errors telling that some parts of some packages uses unknown compression while doing apt update. In particular, the cause of the issue lays in the middle of the dpkg: # apt update (...) # apt upgrade (...) dpkg-deb: error: archive '/var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up Traceback (most recent call last): File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb output = subprocess.check_output(command) File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['dpkg-deb', '-f', '/var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 323, in <module> main(config) File "/usr/bin/apt-listchanges", line 104, in main pkg = DebianFiles.Package(deb) File "/usr/share/apt-listchanges/DebianFiles.py", line 358, in __init__ parser.readdeb(self.path) File "/usr/share/apt-listchanges/DebianFiles.py", line 127, in readdeb raise RuntimeError(_("Error processing '%(what)s': %(errmsg)s") % RuntimeError: Error processing '/var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb': Command '['dpkg-deb', '-f', '/var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2. dpkg-deb: error: archive '/tmp/apt-dpkg-install-XiLPN8/01-libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb' uses unknown compression for member 'control.tar .zst', giving up dpkg: error processing archive /tmp/apt-dpkg-install-XiLPN8/01-libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb (--unpack): dpkg-deb --control subprocess returned error exit status 2 (...) Errors were encountered while processing: /tmp/apt-dpkg-install-XiLPN8/01-libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb (...) E: Sub-process /usr/bin/dpkg returned an error code (1) To proove it, I've run the dpkg command (simplified) directly: # dpkg -f /var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb 'Package' dpkg-deb: error: archive '/var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up The file really does use such compression: # file /var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb /var/cache/apt/archives/libdrm-amdgpu1_2.4.107+git2109030500.d201a4~oibaf~i_amd64.deb: Debian binary package (format 2.0), with control.tar.zs, data compression zst I do have installed the zstd package: # apt search zstd (...) libzstd1/stable,stable,now 1.4.8+dfsg-2.1 amd64 [installed,automatic] fast lossless compression algorithm (...) zstd/stable,stable,now 1.4.8+dfsg-2.1 amd64 [installed] fast lossless compression algorithm -- CLI tool Furthermore, I found following dpkg bugreport: https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1764220 saying the zstd support have been added in 1.18.4ubuntu1.7 version. My version of dpkg is 1.20.9: # dpkg --version Debian 'dpkg' package management program version 1.20.9 (amd64). (...) so that may not be an issue. I've also removed the whole contents of the /var/cache/apt/archives/* and re-update && upgraded. Didn't help. Do you have any tips what to do with that? Is there/Are there an further packages missing? Does the Debian version doesn't have such feature? Is it an configuration issue? Is there any workaround?
Debian’s dpkg package didn’t support zstd compression prior to version 1.21.18. Support was added just in time for Debian 12. I’m guessing you’ve added a Ubuntu PPA; you shouldn’t use those with Debian.
zst compression not supported by apt/dpkg
1,412,351,566,000
Is there a way to use dpkg to view a changelog between different versions of a package? If I wanted to know e.g., why 'passwd' was being upgraded in a recent update is there a way to use dpkg to see what changed? $ dpkg -l passwd Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii passwd 1:4.2-3.1 amd64 change and administer password an It's being upgraded to 1:4.2-3.3... I know with Debian I can look at the package notes and from there at the linked Debian changelog. But this doesn't apply to all deb based distros, and it's awkward for a quick look at what's new.
dpkg does not provide any facility to read the changelog of a package. you should extract the package and read the changelog dpkg -X <package.deb> <folder> then you can read the changelog using the dpkg-parsechangelog utility dpkg-parsechangelog -l <folder>/usr/share/doc/<package>/changelog.Debian.gz Since that's a real pain , if your distro is using apt-get you can use apt-get changelog <packagename> or apt changelog <packagename>
Use dpkg to view changelog
1,412,351,566,000
I have installed the package geoip-bin using the apt-get command: sudo apt-get install geoip-bin and I wanted to know the command line command to use this package. But when I try to list the files that the geoip-bin package installs, to try and find the executable file, it's not listed in the dpkg -S output % dpkg -S geoip-bin geoip-bin: /usr/share/doc/geoip-bin/changelog.Debian.gz geoip-bin: /usr/share/lintian/overrides/geoip-bin geoip-bin: /usr/share/doc/geoip-bin geoip-bin: /usr/share/doc/geoip-bin/copyright After some research I learnt that this package installs a command/executable /usr/bin/geoiplookup. So at this point, I now know the command, but for future purposes, I would like to know how to find out what files a package installs. Doing a "reverse" file lookup with, dpkg -S shows that this file came from the geo-ip bin package. % dpkg -S /usr/bin/geoiplookup geoip-bin: /usr/bin/geoiplookup I wondered if dpkg -S is not showing the file in the output because /usr/bin/geoiplookup is provided by one of the dependencies of geoip-bin. After querying the dependencies with e.g. apt-cache show geoip-bin and then recursively querying the files and sub-dependencies, I still was not able to list the files provided by the package geoip-bin. How can I generate a full listing of the files installed by a package?
-L, --listfiles dpkg -L package-name
How can I list all files which have been installed by an APT package?
1,412,351,566,000
Is there any way (dpkg, apt?) to get a package's sources and URL to repository, if available, in Debian ?
What about sudo apt-get source packageName? It installs the newest available source tree, when available, in the current working directory. Check man apt-get for more details.
Get package sources and repository link
1,412,351,566,000
I have deleted some files around /var/lib/dpkg/, namely: /var/lib/dpkg/status /var/lib/dpkg/available /var/lib/dpkg/info/* I understand Debian uses these files to keep some information about installed packages. Now when I do apt-get update, I get following error: Reading package lists... Error! E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory) E: The package lists or status file could not be parsed or opened. As I understand the FHS, files located in /var are not supposed to be system-critical. Rater these should be temporary files, logs, caches, and similar. Is there therefore a way to recreate the deleted files ?
If you look at the purpose of /var as given in the Filesystem Hierarchy Standard, it says: /var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files. Note that "transient and temporary" files are just one of the things it contains. It also contains "spool directories and files" and "administrative and logging data". You deleted critical "administrative data". It goes on to explain why /var exists: /var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to during system operation (as opposed to installation and software maintenance) must be in /var. That's the key thing about /var: the data in it changes, unlike /usr (which only changes when you add/remove/update software). Further sections explain the various subdirectories of /var; for example, /var/lib (where the files you deleted used to live) holds "state information pertaining to an application or the system", defined as "data that programs modify while they run, and that pertains to one specific host." You really shouldn't delete files without knowing what the specific file is for. With the files you deleted, unless you have a backup of these files, I think the only thing left to do is take a backup of /home, /etc etc. and reinstall. Until you do so, you'll be unable to use dpkg (and APT, etc.). Other than that, the system should continue to function.
How to recreate /var/lib/dpkg/status?
1,412,351,566,000
On my Kubuntu 14.4 (which has python 2.7.6 as standard) my python is broken after I tried to install python 2.7.10 after building from source from python.org with the help of How to install the latest Python version on Debian separately or upgrade?. I am not able to repair it with the standard commands I suspect that my dpkg is somehow confused/broken regarding the python installation. I would like to fix dpkg in this aspect. I suspect that this has something to do with the file /var/lib/dpkg/status and /var/lib/dpkg/available and /var/lib/dpkg/info/* particularily the first. I think I have to reset dpkg somehow, but I am really no expert. The reason why I think this is: $ apt-cache policy python python: Installed: 2.7.10-1 Candidate: 2.7.10-1 Version table: *** 2.7.10-1 0 100 /var/lib/dpkg/status 2.7.5-5ubuntu3 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages $ /usr/bin/python2.7 Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit() The Reason I tried to install python 2.7.10 is because I needed it for another program (because of issues with ssl / openssl of python 2.7.6), but now I just want to get my system repaired - just let it be python 2.7.6. The Full Technical I started trying to solve this by asking on ubuntu https://askubuntu.com/questions/648424/muon-is-gone-after-change-of-python-issues-after-python-2-7-10-installation-on but I did not get any answer there. Maybe it was the wrong crowd. I have tried quite a bit since then and have an idea what's the problem, but don't know the steps to accomplish this. It started with me not being able to install muon with sudo apg-get install muon: $ sudo apt-get install muon 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: muon : Depends: apt-xapian-index but it is not going to be installed E: Unable to correct problems, you have held broken packages. The typical advice (e.g. from https://askubuntu.com/questions/118749/package-system-is-broken-how-to-fix-it) does not help: sudo apt-get autoremove sudo apt-get clean sudo apt-get autoclean sudo apt-get update sudo apt-get upgrade -f sudo apt-get -f install muon or sudo apt-get -f install or sudo dpkg --configure -a sudo apt-get update && sudo apt-get dist-upgrade sudo apt-get install muon or sudo apt-get -o dpkg::options::="--force-confnew" -o dpkg::options::="--force-confmiss" --reinstall install muon did not help. So I tried $ sudo apt-get install apt-xapian-index 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: apt-xapian-index : Depends: python-xapian (>= 1.0.2) but it is not going to be installed Depends: python-apt (>= 0.7.93.2) but it is not going to be installed Depends: python-debian (>= 0.1.14) but it is not going to be installed Depends: python:any (>= 2.7.1-0ubuntu2) E: Unable to correct problems, you have held broken packages. and found out the issue is with other programs as well like $ sudo apt-get install meld 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: meld : Depends: python:any (>= 2.7.1-0ubuntu2) Depends: python-gtk2 (>= 2.14) but it is not going to be installed Depends: python-glade2 (>= 2.14) but it is not going to be installed Depends: python-gobject-2 (>= 2.16) but it is not going to be installed Recommends: python-gnome2 but it is not going to be installed Recommends: python-gconf but it is not going to be installed Recommends: python-gtksourceview2 (>= 2.4) but it is not going to be installed E: Unable to correct problems, you have held broken packages. So I tried (without luck) $ sudo update-alternatives --config python update-alternatives: error: no alternatives for python The following did not help either: sudo dpkg -P python2.7 sudo apt-get install python2.7 sudo dpkg -P python-minimal sudo apt-get autoremove && sudo apt-get clean sudo apt-get update && sudo apt-get -f install I am getting $ apt-cache policy python python: Installed: 2.7.10-1 Candidate: 2.7.10-1 Version table: *** 2.7.10-1 0 100 /var/lib/dpkg/status 2.7.5-5ubuntu3 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages Trying to reinstall python does not work $ sudo apt-get -o dpkg::options::="--force-confnew" -o dpkg::options::="--force-confmiss" --reinstall install python Reading package lists... Done Building dependency tree Reading state information... Done Reinstallation of python is not possible, it cannot be downloaded. 0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded. or $ sudo apt-get -o dpkg::options::="--force-confnew" -o dpkg::options::="--force-confmiss" --reinstall install python2 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python2 and trying to build an uninstaller does not work either: ~/Python-2.7.10$ sudo make uninstall make: *** No rule to make target `uninstall'. Stop. So I started to suspect that I have to get dpkg fixed somehow, because $ apt-cache policy python python: Installed: 2.7.10-1 Candidate: 2.7.10-1 Version table: *** 2.7.10-1 0 100 /var/lib/dpkg/status 2.7.5-5ubuntu3 0 500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages $ /usr/bin/python2.7 Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit() More information (Appendix) $ dpkg -l python* | grep -v ^un Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/ Halb installiert/Trigger erWartet/Trigger anhängig |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht) ||/ Name Version Architektur Beschreibung +++-===========================================-=======================================-============-===================================================================================================================================================================================================================== ii python 2.7.10-1 amd64 Python 2.7.10 ii python-apt-common 0.9.3.5ubuntu1 all Python interface to libapt-pkg (locales) ii python-chardet-whl 2.2.1-2~ubuntu1 all universal character encoding detector ii python-colorama-whl 0.2.5-0.1ubuntu2 all Cross-platform colored terminal text in Python - Wheels ii python-cups 1.9.66-0ubuntu2 amd64 Python bindings for CUPS rc python-cupshelpers 1.4.3+20140219-0ubuntu2.6 all Python modules for printer configuration with CUPS ii python-dbus-dev 1.2.0-2build2 all main loop integration development files for python-dbus ii python-distlib-whl 0.1.8-1ubuntu1 all low-level components of python distutils2/packaging rc python-gobject-2 2.28.6-12build1 amd64 deprecated static Python bindings for the GObject library ii python-html5lib-whl 0.999-3~ubuntu1 all HTML parser/tokenizer based on the WHATWG HTML5 specification ii python-ldb 1:1.1.16-1 amd64 Python bindings for LDB ii python-minimal 2.7.5-5ubuntu3 amd64 minimal subset of the Python language (default version) ii python-ntdb 1.0-2ubuntu1 amd64 Python bindings for NTDB ii python-pam 0.4.2-13.1ubuntu3 amd64 Python interface to the PAM library ii python-pip-whl 1.5.4-1ubuntu3 all alternative Python package installer ii python-renderpm 3.0-1build1 amd64 python low level render interface ii python-reportlab-accel 3.0-1build1 amd64 C coded extension accelerator for the ReportLab Toolkit ii python-requests-whl 2.2.1-1ubuntu0.3 all elegant and simple HTTP library for Python, built for human beings ii python-setuptools-whl 3.3-1ubuntu2 all Python Distutils Enhancements (wheel package) ii python-six-whl 1.5.2-1ubuntu1 all Python 2 and 3 compatibility library (universal wheel) rc python-support 1.0.15 all automated rebuilding support for Python modules ii python-talloc 2.1.0-1 amd64 hierarchical pool based memory allocator - Python bindings ii python-tdb 1.2.12-1 amd64 Python bindings for TDB ii python-twisted-bin 13.2.0-1ubuntu1 amd64 Event-based framework for internet applications rc python-twisted-core 13.2.0-1ubuntu1 all Event-based framework for internet applications rc python-ubuntu-sso-client 13.10-0ubuntu6 all Ubuntu Single Sign-On client - Python library ii python-urllib3-whl 1.7.1-1ubuntu3 all HTTP library with thread-safe connection pooling ii python2.7 2.7.6-8ubuntu0.2 amd64 Interactive high-level object-oriented language (version 2.7) ii python2.7-minimal 2.7.6-8ubuntu0.2 amd64 Minimal subset of the Python language (version 2.7) ii python3 3.4.0-0ubuntu2 amd64 interactive high-level object-oriented language (default python3 version) ii python3-apport 2.14.1-0ubuntu3.11 all Python 3 library for Apport crash report handling ii python3-apt 0.9.3.5ubuntu1 amd64 Python 3 interface to libapt-pkg ii python3-aptdaemon 1.1.1-1ubuntu5.2 all Python 3 module for the server and client of aptdaemon ii python3-chardet 2.2.1-2~ubuntu1 all universal character encoding detector for Python3 ii python3-colorama 0.2.5-0.1ubuntu2 all Cross-platform colored terminal text in Python - Python 3.x ii python3-commandnotfound 0.3ubuntu12 all Python 3 bindings for command-not-found. ii python3-dbus 1.2.0-2build2 amd64 simple interprocess messaging system (Python 3 interface) ii python3-dbus.mainloop.qt 4.10.4+dfsg-1ubuntu1 amd64 D-Bus Support for PyQt4 with Python 3 ii python3-debian 0.1.21+nmu2ubuntu2 all Python 3 modules to work with Debian-related data formats ii python3-defer 1.0.6-2build1 all Small framework for asynchronous programming (Python 3) ii python3-dev 3.4.0-0ubuntu2 amd64 header files and a static library for Python (default) ii python3-distlib 0.1.8-1ubuntu1 all low-level components of python distutils2/packaging ii python3-distupgrade 1:0.220.7 all manage release upgrades ii python3-gdbm:amd64 3.4.0-0ubuntu1 amd64 GNU dbm database support for Python 3.x ii python3-gi 3.12.0-1ubuntu1 amd64 Python 3 bindings for gobject-introspection libraries ii python3-html5lib 0.999-3~ubuntu1 all HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 3) ii python3-minimal 3.4.0-0ubuntu2 amd64 minimal subset of the Python language (default python3 version) ii python3-pip 1.5.4-1ubuntu3 all alternative Python package installer - Python 3 version of the package ii python3-pkg-resources 3.3-1ubuntu2 all Package Discovery and Resource Access using pkg_resources ii python3-problem-report 2.14.1-0ubuntu3.11 all Python 3 library to handle problem reports ii python3-pycurl 7.19.3-0ubuntu3 amd64 Python 3 bindings to libcurl ii python3-pykde4 4:4.13.3-0ubuntu0.1 amd64 Python 3 bindings for the KDE Development Platform ii python3-pyqt4 4.10.4+dfsg-1ubuntu1 amd64 Python3 bindings for Qt4 ii python3-requests 2.2.1-1ubuntu0.3 all elegant and simple HTTP library for Python3, built for human beings ii python3-setuptools 3.3-1ubuntu2 all Python3 Distutils Enhancements ii python3-sip 4.15.5-1build1 amd64 Python 3/C++ bindings generator runtime library ii python3-six 1.5.2-1ubuntu1 all Python 2 and 3 compatibility library (Python 3 interface) ii python3-software-properties 0.92.37.3 all manage the repositories that you install software from ii python3-uno 1:4.2.8-0ubuntu2 amd64 Python-UNO bridge ii python3-update-manager 1:0.196.13 all python 3.x module for update-manager ii python3-urllib3 1.7.1-1ubuntu3 all HTTP library with thread-safe connection pooling for Python3 ii python3-wheel 0.24.0-1~ubuntu1 all built-package format for Python ii python3-xkit 0.5.0ubuntu2 all library for the manipulation of xorg.conf files (Python 3) ii python3.4 3.4.0-2ubuntu1.1 amd64 Interactive high-level object-oriented language (version 3.4) ii python3.4-dev 3.4.0-2ubuntu1.1 amd64 Header files and a static library for Python (v3.4) ii python3.4-minimal 3.4.0-2ubuntu1.1 amd64 Minimal subset of the Python language (version 3.4) $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS Release: 14.04 Codename: trusty $ grep -P '^[ \t]*[^#[ \t]+' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty main restricted /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty main restricted /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates main restricted /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates main restricted /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty universe /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty universe /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates universe /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates universe /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty multiverse /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty multiverse /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates multiverse /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates multiverse /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse /etc/apt/sources.list:deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu trusty-security main restricted /etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu trusty-security universe /etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu trusty-security universe /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu trusty-security multiverse /etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse /etc/apt/sources.list:deb http://archive.canonical.com/ubuntu trusty partner /etc/apt/sources.list:deb http://extras.ubuntu.com/ubuntu trusty main /etc/apt/sources.list:deb http://cran.uni-muenster.de/bin/linux/ubuntu trusty/ /etc/apt/sources.list.d/fossfreedom-packagefixes-trusty.list:deb http://ppa.launchpad.net/fossfreedom/packagefixes/ubuntu trusty main /etc/apt/sources.list.d/jitsi.list:deb http://download.jitsi.org/deb unstable/ /etc/apt/sources.list.d/leviatan1-ppa-trusty.list:deb http://ppa.launchpad.net/leviatan1/ppa/ubuntu trusty main $ whereis python python: /usr/bin/python /usr/bin/python3.4-config /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python2.7 /usr/bin/python3.4m-config /etc/python /etc/python3.4 /etc/python2.7 /usr/lib/python3.4 /usr/lib/python2.7 /usr/bin/X11/python /usr/bin/X11/python3.4-config /usr/bin/X11/python3.4 /usr/bin/X11/python3.4m /usr/bin/X11/python2.7 /usr/bin/X11/python3.4m-config /usr/local/lib/python3.4 /usr/local/lib/python2.7 /usr/include/python3.4 /usr/include/python3.4m /usr/share/python /usr/share/man/man1/python.1.gz $ whereis python2.7 python2: /usr/bin/python2.7 /usr/bin/python2 /etc/python2.7 /usr/lib/python2.7 /usr/bin/X11/python2.7 /usr/bin/X11/python2 /usr/local/lib/python2.7 /usr/share/man/man1/python2.1.gz
You have installed Python packages that are more recent than what your distribution provides. For example, you have python version 2.7.10-1 installed but your distribution only has version 2.7.5-5ubuntu3. APT doesn't downgrade packages unless explicitly told to do so. So for example if you try to install a package that depends on the exact version of Python, it won't work, because the python package can't be downgraded. Even apt-get --reinstall install python fails because APT won't downgrade Python to 2.7.5. In order to repair your system, you need to allow APT to perform downgrades. To do that, define APT preferences. Create a file /etc/apt/preferences.d/allow-downgrade containing Package: * Pin: release o=Ubuntu Pin-Priority: 1001 The files in /etc/apt/preferences.d (plus /etc/apt/preferences) contain priority declarations that override the default selection when multiple versions of a package are available, which is “prefer the latest version from the target distribution”. Giving a package a priority over 1000 causes it to be preferred even if it's an older version that a package with a lower priority. Installed packages have priority 500 so the package from Ubuntu wins. For more information see: man apt_preferences I think once you've set these priorities you can run apt-get update apt-get upgrade to downgrade all your packages to the version in Ubuntu (packages not in Ubuntu won't be removed). Also run apt-get -f install and don't try to install any other software until this completes successfully. Once everything is downgraded, remove the preferences file and run apt-get update again.
Repairing python setup
1,412,351,566,000
I am trying to install a 3rd party .deb package that I have installed before on Debian 8. But I cannot install on a fresh Debian 9 setup because I get the following error: dpkg: dependency problems prevent configuration of parity: parity depends on libssl1.0.0 (>= 1.0.0); however: Package libssl1.0.0 is not installed. I do have libssl1.0.2 installed. But it is not being recognized as ">= libssl1.0.0" so I wonder how to fix this. Do I install libssl1.0.0 manually? If so, how? Do I symlink something? If so, what? Something else?
libssl1.0.2 and libssl1.0.0 are different packages, providing incompatible libraries; that’s why you can’t satisfy a libssl1.0.0 dependency using libssl1.0.2. To satisfy your package’s requirements, I’d suggest adding the Debian 8 repositories to your configuration, since Debian 8 is still supported (so if necessary you’ll get security updates). To do so, edit your /etc/apt/sources.list file, and copy every stretch line, replacing stretch with jessie (so you end up with both stretch and jessie lines). Then run apt update, and apt install libssl1.0.0 should work. Alternatively, you can download the package (look for your architecture at the bottom of the page), and install it with dpkg -i. In both cases, apt-mark auto libssl1.0.0 will help: that way the package will be considered for auto-removal, should it become unnecessary in the future.
How to convince dpkg that libssl1.0.2 is >= libssl1.0.0?
1,412,351,566,000
I have a source package (foo) which produces two binary packages (foo-a and foo-b). In version 2.0, file /etc/foo was moved from foo-a to foo-b. That causes apt upgrade to fail with: $ sudo apt upgrade ... dpkg: error processing archive /var/cache/apt/archives/foo-b_2.0_amd64.deb (--unpack): trying to overwrite '/etc/foo', which is also in package foo-a 1.0. Is there a client-side solution using apt to resolve this?
The correct (tm) solution to this is to fix the dependencies of foo-a and foo-b by fixing debian/control with: Package: foo-b Replaces: foo-a (<< 2.0) Breaks: foo-a (<< 2.0) Reference: https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-in-other-packages However, If you are not the developer of this package or maintainer of the repository, you'll need a client-side solution. A client-side solution that does work is to use the --force-overwrite option of dpkg: $ apt download foo-{a,b} $ dpkg --force-overwrite -i foo-{a,b}_2.0_amd64.deb Reference: https://man7.org/linux/man-pages/man1/dpkg.1.html#OPTIONS However, if you are looking for a apt-only 1-liner, then you'll need apt to forward the --force-overwrite option to dpkg. This can be done by using the --option described briefly in apt-get(8). apt.conf(5) says DPkg::options can be used to forward options to dpkg. None of those man pages clearly define the whole syntax, so after some experimentation, I found it can be done like so: $ sudo apt upgrade -o DPkg::options::="--force-overwrite" ... Unpacking foo-b (2.0) over (1.0) ... dpkg: warning: overriding problem because --force enabled: dpkg: warning: trying to overwrite '/etc/foo', which is also in package foo-a 1.0 ...
Is there an apt --force-overwrite option?
1,412,351,566,000
I'm working with a Raspberry Pi B+ and Raspbian 5/5/2015 and some guides that are a few years old. I've got an external NTFS HDD hooked up to the Pi. Due to the articles age(s), common practices have changed, and it turns out that certain packages and features and functions are now built-in and/or automatic. For example, I found out that Raspbian will handle the automounting of an NTFS drive/volume if you just install ntfs-3g. All instructions and guidance I could find (IRC, raspberry pi forum, and a Linux dude I know) all went extremely technical doing who-knows-what to my system to try to assist me, when in reality we were all tripping over automatic features that no one knew about or thought to check. I've since installed Raspbian fresh to a new SD card and so far just turned on SSH, updated apt-get, and installed ntfs-3g. This is the article I am using right now: http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/?PageSpeed=noscript My next step is to get Samba up and running. Yes, I know Linux people hate Windows, but I'm a Windows guy, so until I can know enough about Linux for a Linux system to be my fallback, Windows machines are my fallbacks. Eventually this Raspberry Pi will get a multi-TB drive, though for right now it's just a few GB; which is why it needs to be NTFS. I would like to check if Samba is installed, since the next step in my instructions tell me how to install and configure it. I've tried a few commands and I'm not sure what to do with the results or how to use them. I searched here and the technical details are above my capabilities and I don't think they address my seemingly simple need to find out if a package is installed or not. I tried: apt-cache dump this gave me way too much data. It scrolled down for a few minutes. I got this from The Raspberry Pi Handbook 3rd Edition (Link - Amazon) I tried apt-cache showpkg samba Package: samba Versions: 2:3.6.6-6+deb7u5 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_ wheezy_main_binary-armhf_Packages) Description Language: File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_d ists_wheezy_main_binary-armhf_Packages MD5: 0122ac62ef5f4ae21eb2e195eb45ad1d Reverse Depends: winbind,samba 2.2.3-2 task-file-server,samba swat,samba 2:3.6.6-6+deb7u5 smbclient,samba 2.999+3.0.alpha21-4 samba4-common-bin,samba 2:3.3.0~rc2-5 samba4,samba 2:3.3.0~rc2-5 samba-dbg,samba 2:3.6.6-6+deb7u5 samba-common-bin,samba 3.0.20b-1 samba-common,samba 3.0.20b-1 qtsmbstatus-server,samba qemu-system,samba nautilus-share,samba 3.0.27a libwbclient0,samba 2:3.4.1 libpam-winbind,samba 2.2.3-2 libpam-smbpass,samba libnss-winbind,samba 2.2.3-2 gadmin-samba,samba education-main-server,samba dpsyco-samba,samba Dependencies: 2:3.6.6-6+deb7u5 - samba-common (5 2:3.6.6-6+deb7u5) libwbclient0 (5 2:3.6.6-6+d eb7u5) libacl1 (2 2.2.51-8) libattr1 (2 1:2.4.46-8) libc6 (2 2.13-28) libcap2 (2 2.10) libcomerr2 (2 1.01) libcups2 (2 1.4.0) libgcc1 (2 1:4.4.0) libgssapi-krb5 -2 (2 1.10+dfsg~) libk5crypto3 (2 1.6.dfsg.2) libkrb5-3 (2 1.10+dfsg~) libldap-2 .4-2 (2 2.4.7) libpam0g (2 0.99.7.1) libpopt0 (2 1.14) libtalloc2 (2 2.0.4~git20 101213) libtdb1 (2 1.2.7+git20101214) zlib1g (2 1:1.1.4) debconf (18 0.5) debcon f-2.0 (0 (null)) libpam-runtime (2 1.0.1-11) libpam-modules (0 (null)) lsb-base (2 3.2-13) procps (0 (null)) update-inetd (0 (null)) adduser (0 (null)) dpkg (2 1.15.7.2) openbsd-inetd (16 (null)) inet-superserver (0 (null)) smbldap-tools (0 (null)) ldb-tools (0 (null)) ctdb (0 (null)) logrotate (0 (null)) tdb-tools (0 (null)) samba4 (3 4.0.0~alpha6-2) samba-common (1 2.0.5a-2) Provides: 2:3.6.6-6+deb7u5 - Reverse Provides: pi@raspberrypi ~ $ apt-cache showpkg ntfs-3g Package: ntfs-3g Versions: 1:2012.1.15AR.5-2.1+deb7u2 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages) (/var/lib/dpkg/status) Description Language: File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages MD5: b2df024e8627b5d253b85f35263376ef Reverse Depends: udisks,ntfs-3g ntfsprogs,ntfs-3g ntfs-config,ntfs-3g ntfs-3g-dev,ntfs-3g 1:2012.1.15AR.5-2.1+deb7u2 ntfs-3g-dbg,ntfs-3g 1:2012.1.15AR.5-2.1+deb7u2 kvpm,ntfs-3g fsarchiver,ntfs-3g Dependencies: 1:2012.1.15AR.5-2.1+deb7u2 - debconf (18 0.5) debconf-2.0 (0 (null)) libc6 (2 2.13-28) libfuse2 (2 2.8.1) libgcc1 (2 1:4.4.0) libgcrypt11 (2 1.4.5) libgnutls26 (2 2.12.17-0) multiarch-support (0 (null)) fuse (0 (null)) libntfs-3g75 (0 (null)) ntfsprogs (3 1:2011.10.9AR.1-3~) libntfs-3g75 (0 (null)) ntfsprogs (0 (null)) Provides: 1:2012.1.15AR.5-2.1+deb7u2 - Reverse Provides: pi@raspberrypi ~ $ apt-cache showpkg ntfsprogs Package: ntfsprogs Versions: 1:2012.1.15AR.5-2.1+deb7u2 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages) Description Language: File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages MD5: 95f41af9cf1d0b5b66afb7d2a9e7c75d Reverse Depends: partitionmanager,ntfsprogs ntfs-3g,ntfsprogs ntfs-3g,ntfsprogs 1:2011.10.9AR.1-3~ gparted,ntfsprogs fsarchiver,ntfsprogs fai-setup-storage,ntfsprogs Dependencies: 1:2012.1.15AR.5-2.1+deb7u2 - ntfs-3g (0 (null)) Provides: 1:2012.1.15AR.5-2.1+deb7u2 - Reverse Provides: but I'm not sure what to make of the results. I can't tell if it's going to apt-get the servers and getting information, or pulling it from my system. I tried : dpkg --get-selections which I got from here: http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/?PageSpeed=noscript but I think I'm running into the same problem. It seems the syntax has changed since 2007. The man page / help file seems to lead me to believe that the command should work Usage: dpkg [<option> ...] <command> --get-selections [<pattern> ...] Get list of selections to stdout. but I get an error: dpkg –get-selections samba dpkg: error: need an action option I found a few wuestions here that are related, but don't give me what I am looking for. I am interested in just knowing what's installed, but I guess that's a topic for another question. What packages are installed by default in Debian? Is there a term for that set? Why some of those packages are `automatically installed` and some not? How do we know what applications are installed in Linux? Loop to check whether a Debian package is installed or not Determine if a package is provided by an installed packagein Arch Linux
apt-cache showpkg shows detailed information about potentially installable packages. It does indicate whether the package is installed, kind of, but not in a very readable way: Versions: 2:3.6.6-6+deb7u5 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages) If the package was installed, you'd see (/var/lib/dpkg/status) at the end of the line. However, this isn't fully reliable, because you'd also see this indication if the package was known to your system but not fully installed, e.g. if it was in the “package uninstalled but configuration files left over” state. A more useful apt-cache subcommand is apt-cache policy. It clearly shows the installed version (if any) and the available version(s). For example, here's output from a machine which has samba installed but not samba-dev: samba: Installed: 2:4.1.17+dfsg-2 Candidate: 2:4.1.17+dfsg-2 Version table: *** 2:4.1.17+dfsg-2 0 500 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages 100 /var/lib/dpkg/status samba-dev: Installed: (none) Candidate: 2:4.1.17+dfsg-2 Version table: 2:4.1.17+dfsg-2 0 500 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages Alternatively, you can use the dpkg command to get information about your current system. APT is the software that manages the download of packages, dependency analysis, etc. Dpkg is the low-level software that carries out the actual installation of a package file. dpkg -l samba This shows a line beginning with i if the package is installed, and a line beginning with u or p or nothing at all if the package is not installed. $ dpkg -l samba samba-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii samba 2:4.1.17+dfs amd64 SMB/CIFS file, print, and login s dpkg-query: no packages found matching samba-dev (dpkg-query is the dpkg subcommand that returns information about the package database.) Note that if you just want to ensure that a package is installed, you can simply run apt-get install samba This won't do anything if the latest version of the package that's available in your distribution is already installed. It will install the package if it isn't installed yet, and it will upgrade it if you have an older version.
How to find out if a specific package is installed on Debian?
1,412,351,566,000
I started an upgrade of my Kubuntu 12.04 system with this command, as usual: sudo apt-get --show-upgraded dist-upgrade I came back later and it had failed: Preconfiguring packages ... (Reading database ... 478306 files and directories currently installed.) Preparing to replace ... Unpacking replacement base-files ... Processing triggers for man-db ... Processing triggers for install-info ... ... Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.8.0-32-lowlatency gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.8.0-32-lowlatency with 1. dpkg: error processing initramfs-tools (--unpack): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) here's the problem: $ df -h output: Filesystem Size Used Avail Use% Mounted on /dev/sda1 894M 879M 0 100% /boot manually deleted older files and now some space is free Filesystem Size Used Avail Use% Mounted on /dev/sda1 894M 129M 717M 16% /boot I ran this next: sudo apt-get autoremove Next: sudo apt-get -f install output: The following extra packages will be installed: initramfs-tools The following packages will be upgraded: initramfs-tools dpkg: dependency problems prevent configuration of initramfs-tools: initramfs-tools depends on initramfs-tools-bin (<< 0.99ubuntu13.3.1~); however: Version of initramfs-tools-bin on system is 0.99ubuntu13.4. dpkg: error processing initramfs-tools (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) sudo apt-get install initramfs-tools the above fails dpkg -l initramfs-tools output: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ iF initramfs-tool 0.99ubuntu13.3 tools for generating an initramfs sudo apt-get install --reinstall initramfs-tools output: The following packages will be upgraded: initramfs-tools 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/49.2 kB of archives. After this operation, 0 B of additional disk space will be used. dpkg: dependency problems prevent configuration of initramfs-tools: initramfs-tools depends on initramfs-tools-bin (<< 0.99ubuntu13.3.1~); however: Version of initramfs-tools-bin on system is 0.99ubuntu13.4. dpkg: error processing initramfs-tools (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Here is the output of apt-cache policy initramfs-tools-bin initramfs-tools: initramfs-tools-bin: Installed: 0.99ubuntu13.4 Candidate: 0.99ubuntu13.4 Version table: *** 0.99ubuntu13.4 0 500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages 100 /var/lib/dpkg/status 0.99ubuntu13 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages initramfs-tools: Installed: 0.99ubuntu13.3 Candidate: 0.99ubuntu13.4 Version table: 0.99ubuntu13.4 0 500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages *** 0.99ubuntu13.3 0 100 /var/lib/dpkg/status 0.99ubuntu13 0 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages As suggested below, here are my next steps: $ sudo apt-get update $ sudo apt-get -f install initramfs-tools=0.99ubuntu13 initramfs-tools-bin=0.99ubuntu13 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ... Use 'apt-get autoremove' to remove them. The following packages will be DOWNGRADED: initramfs-tools initramfs-tools-bin 0 upgraded, 0 newly installed, 2 downgraded, 0 to remove and 4 not upgraded. 1 not fully installed or removed. Need to get 59.2 kB of archives. After this operation, 2,048 B disk space will be freed. Do you want to continue [Y/n]? Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main initramfs-tools all 0.99ubuntu13 [49.2 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main initramfs-tools-bin amd64 0.99ubuntu13 [9,988 B] Fetched 59.2 kB in 0s (124 kB/s) dpkg: warning: downgrading initramfs-tools-bin from 0.99ubuntu13.4 to 0.99ubuntu13. (Reading database ... 478624 files and directories currently installed.) Preparing to replace initramfs-tools-bin 0.99ubuntu13.4 (using .../initramfs-tools-bin_0.99ubuntu13_amd64.deb) ... Unpacking replacement initramfs-tools-bin ... Setting up initramfs-tools-bin (0.99ubuntu13) ... dpkg: dependency problems prevent configuration of initramfs-tools: initramfs-tools depends on initramfs-tools-bin (>= 0.99ubuntu13.3); however: Version of initramfs-tools-bin on system is 0.99ubuntu13. dpkg: error processing initramfs-tools (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Next I tried Giles's suggestion: sudo dpkg --configure -a --force-depends sudo apt-get install -f sudo apt-get dist-upgrade
Your system is in a state which I think should not happen: you have the new version of the dependency initramfs-tools-bin in the installed state, but the old version of the dependency initramfs-tools in a half-installed state. I'm not sure whether the problem is that APT is letting the system get into a state where it can't recover, dpkg is letting the system get into a state where it can't recover, the package maintainer used a combination of dependencies which isn't supported, or my limited understanding doesn't cover this case. Try using dpkg directly: dpkg --configure -a If this still complains about dependencies, try dpkg --configure -a --force-depends If this works, you have the dpkg database in a consistent state. You need to get APT in a good state (which requires no broken dependencies): apt-get -f install After this you can resume normal upgrading. If your purge of /boot was deleting old kernels that were in packages, you won't be able to remove the kernel packages anymore. You'll have to recreate the files. You can create empty files (touch `cat /var/lib/dpkg/info/linux-image-1.2.3-foo`) if you're removing the linux-image-1.2.3-foo package and you manually removed some of its files.
dpkg: dependency problems prevent configuration of initramfs-tools
1,412,351,566,000
Let's say I want to install mysql from a script without being asked any configuration questions like what root password I want to set by apt. I would then preset the debconf variables: echo mysql-server-5.5 mysql-server/root_password password xyzzy | debconf-set-selections echo mysql-server-5.5 mysql-server/root_password_again password xyzzy | debconf-set-selections I got this from a tutorial. What is unclear to me: How did the guy find out the variable names? How did he knew that he had to set mysql-server-5.5 mysql-server/root_password password and mysql-server-5.5 mysql-server/root_password_again respectively? I know I could extract the .deb package by issuing dpkg-deb -R package.deb EXTRACTDIR/ - but I don't see where those variables are stored. How would I find out the debconf variables for any other package?
You can inspect what gets stored in debconf using debconf-get-selections. This is useful if you have actually done the installation already. Alternately, these settings are used in the package maintainer scripts. With the dpkg-deb command you have run, these are in the DEBIAN subdirectory of EXTRACTDIR. As an example, from lightdm: $ grep db_ lightdm/DEBIAN -R lightdm/DEBIAN/postrm: db_purge lightdm/DEBIAN/prerm: db_unregister shared/default-x-display-manager lightdm/DEBIAN/prerm: if db_get shared/default-x-display-manager; then lightdm/DEBIAN/prerm: db_metaget shared/default-x-display-manager owners lightdm/DEBIAN/prerm: db_subst shared/default-x-display-manager choices "$RET" lightdm/DEBIAN/prerm: db_get shared/default-x-display-manager lightdm/DEBIAN/prerm: if db_get "$RET"/daemon_name; then lightdm/DEBIAN/prerm: db_fset shared/default-x-display-manager seen false lightdm/DEBIAN/prerm: db_input critical shared/default-x-display-manager || true lightdm/DEBIAN/prerm: db_go lightdm/DEBIAN/prerm: db_get shared/default-x-display-manager lightdm/DEBIAN/prerm: db_get "$RET"/daemon_name lightdm/DEBIAN/postinst: if db_get shared/default-x-display-manager; then lightdm/DEBIAN/postinst: if db_get "$DEFAULT_DISPLAY_MANAGER"/daemon_name; then lightdm/DEBIAN/postinst:db_stop lightdm/DEBIAN/config:if db_metaget shared/default-x-display-manager owners; then lightdm/DEBIAN/config:if db_metaget shared/default-x-display-manager choices; then lightdm/DEBIAN/config: db_subst shared/default-x-display-manager choices "$OWNERS" || : lightdm/DEBIAN/config: db_fset shared/default-x-display-manager seen false || : lightdm/DEBIAN/config: db_set shared/default-x-display-manager "$CURRENT_DEFAULT" lightdm/DEBIAN/config: if db_get shared/default-x-display-manager; then lightdm/DEBIAN/config: db_set shared/default-x-display-manager lightdm lightdm/DEBIAN/config: db_fset shared/default-x-display-manager seen true lightdm/DEBIAN/config: db_input high shared/default-x-display-manager || : lightdm/DEBIAN/config: db_go || : lightdm/DEBIAN/config:if db_get shared/default-x-display-manager; then The various db_* functions are helper functions for handling debconf, obtained from /usr/share/debconf/confmodule. So, in the case of lightdm, shared/default-x-display-manager is an important debconf key.
How to find out the variable names for debconf-set-selections?
1,412,351,566,000
I'm trying to install awesome 4.0. To install all the dependencies I ran sudo apt-get build-dep awesome. If I run make in my awesome directory there are some libs still missing: $ make Running cmake… -- git not found. -- asciidoc -> /usr/bin/asciidoc -- xmlto -> /usr/bin/xmlto -- gzip -> /bin/gzip -- ldoc -> /usr/bin/ldoc -- convert -> /usr/bin/convert -- Checking for modules 'glib-2.0;gdk-pixbuf-2.0;cairo;x11;xcb-cursor;xcb-randr;xcb-xtest;xcb-xinerama;xcb-shape;xcb-util>=0.3.8;xcb-keysyms>=0.3.4;xcb-icccm>=0.3.8;xcb-xkb;xkbcommon;xkbcommon-x11;cairo-xcb;libstartup-notification-1.0>=0.10;xproto>=7.0.15;libxdg-basedir>=1.0.0;xcb-xrm' -- No package 'xcb-xrm' found CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal) awesomeConfig.cmake:153 (pkg_check_modules) CMakeLists.txt:17 (include) I checked which package I have to install to close this gap apt-cache search xcb-xrm but I got no results. Then I checked the dependencies list from awesome, there is only a entry xcb-util-xrm so I was looking for apt-cache search xcb-util-xrm`. I got also no results. How to install the missing library? $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial
As mentioned by steeldriver, the package is not available until 16.10. One option is to built it manually from source (github) A Second option would be to get it from a 3rd party ppa sudo add-apt-repository ppa:aguignard/ppa sudo apt-get update sudo apt-get install xcb-util-xrm
No package 'xcb-xrm' found
1,412,351,566,000
I was trying to install Ruby on my remote server. (This is a virtual machine (Debian) in a ESXi server.) I got this error: $ sudo apt-get install ruby1.8 W: Not using locking for read only lock file /var/lib/dpkg/lock E: Unable to write to /var/cache/apt/ E: The package lists or status file could not be parsed or opened. Then I tried : $ sudo dpkg --configure -a dpkg: unable to access dpkg status area: Read-only file system $ mount /dev/sda3 on / type ext4 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/sda1 on /boot type ext4 (rw) /dev/sdb1 on /home type ext4 (rw) mount: warning: /etc/mtab is not writable (e.g. read-only filesystem). It's possible that information reported by mount(8) is not up to date. For actual information about system mount points check the /proc/mounts file. $ cat /proc/mounts rootfs / rootfs rw 0 0 none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 none /proc proc rw,nosuid,nodev,noexec,relatime 0 0 none /dev devtmpfs rw,relatime,size=1553128k,nr_inodes=216450,mode=755 0 0 none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 /dev/disk/by-uuid/cf4fb4ae-6d12-407b-bf43-3b0daaaaaf74 / ext4 ro,relatime,errors=remount-ro,barrier=1,data=ordered 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0 /dev/sda1 /boot ext4 rw,relatime,barrier=1,data=ordered 0 0 /dev/sdb1 /home ext4 rw,relatime,barrier=1,data=ordered 0 0 # dmesg … [1968636.237601] JBD2: Detected IO errors while flushing file data on sdb1-8 [1968772.229102] JBD2: Detected IO errors while flushing file data on sdb1-8 [1968789.799409] IPv6 addrconf: prefix with wrong length 56 [1968990.325125] IPv6 addrconf: prefix with wrong length 56 [1969190.801848] IPv6 addrconf: prefix with wrong length 56 [1969192.245363] JBD2: Detected IO errors while flushing file data on sdb1-8 [1969197.698223] IPv6 addrconf: prefix with wrong length 56 [1969223.105506] JBD2: Detected IO errors while flushing file data on sdb1-8 [1969349.119764] JBD2: Detected IO errors while flushing file data on sdb1-8 [1969398.205686] IPv6 addrconf: prefix with wrong length 56 [1969598.713179] IPv6 addrconf: prefix with wrong length 56 [1969607.241633] JBD2: Detected IO errors while flushing file data on sdbΩ-8 [1969799.220758] IPv6 addrconf: prefix with wrong length 56 [1969825.462909] JBD2: Detected IO errors while flushing file data on sdb1-8 [1969831.231049] JBD2: Detected IO errors while flushing file data on sdb1-8 [1969999.728348] IPv6 addrconf: prefix with wrong length 56 [1970200.247944] IPv6 addrconf: prefix with wrong length 56 [1970221.321558] JBD2: Detected IO errors while flushing file data on sdb1-8 [1970253.105491] JBD2: Detected IO errors while flushing file data on sdb1-8 # nano /var/log/syslog Aug 22 21:47:25 web01 kernel: [1333920.765599] f6442200 00000082 f6a0c640 c10ce21a f7cc78bd c141d100 c141d100 c14186ac Aug 22 21:47:25 web01 kernel: [1333920.765603] f64423bc c3008100 00000000 0000000c ffffffff f8293c04 f6558000 004ac800 Aug 22 21:47:25 web01 kernel: [1333920.765606] 00000001 f64423bc 13dee727 00000663 c10ce260 00001000 de619d70 c2cd6f7c Aug 22 21:47:25 web01 kernel: [1333920.765610] Call Trace: Aug 22 21:47:25 web01 kernel: [1333920.765616] [<c10ce21a>] ? __find_get_block+0x163/0x16d Aug 22 21:47:25 web01 kernel: [1333920.765626] [<f7cc78bd>] ? e1000_xmit_frame+0xa4d [e1000] Aug 22 21:47:25 web01 kernel: [1333920.765629] [<c10ce260>] ? __getblk+0x3c/0x2f3 Aug 22 21:47:25 web01 kernel: [1333920.765634] [<f7eecfc4>] ? do_get_write_access+0x1f6/0x3d1 [jbd2] Aug 22 21:47:25 web01 kernel: [1333920.765638] [<c104435b>] ? wake_bit_function+0x0/0x3c Aug 22 21:47:25 web01 kernel: [1333920.765642] [<f7eed71d>] ? start_this_handle+0x2fb/0x37e [jbd2] Aug 22 21:47:25 web01 kernel: [1333920.765646] [<f7eed1b7>] ? jbd2_journal_get_write_access+0x18/0x26 [jbd2] Aug 22 21:47:25 web01 kernel: [1333920.765655] [<f7f8e355>] ? __ext4_journal_get_write_access+0x38/0x40 [ext4] Aug 22 21:47:25 web01 kernel: [1333920.765662] [<f7f718b5>] ? ext4_reserve_inode_write+0x27/0x57 [ext4] Aug 22 21:47:25 web01 kernel: [1333920.765668] [<f7f71914>] ? ext4_mark_inode_dirty+0x2f/0x1a9 [ext4] Aug 22 21:47:25 web01 kernel: [1333920.765676] [<f7f879fa>] ? ext4_journal_start_sb+0xb4/0xe3 [ext4] Aug 22 21:47:25 web01 kernel: [1333920.765682] [<f7f71b6a>] ? ext4_dirty_inode+0x24/0x35 [ext4] Aug 22 21:47:25 web01 kernel: [1333920.765685] [<c10c99ec>] ? __mark_inode_dirty+0x20/0x10b Aug 22 21:47:25 web01 kernel: [1333920.765688] [<c10c2363>] ? file_update_time+0xbd/0xde Aug 22 21:47:25 web01 kernel: [1333920.765691] [<c1088cf0>] ? __generic_file_aio_write+0x142/0x28d Aug 22 21:47:25 web01 kernel: [1333920.765694] [<c103b3a0>] ? lock_timer_base+0x19/0x35 Aug 22 21:47:25 web01 kernel: [1333920.765696] [<c1088e8c>] ? generic_file_aio_write+0x51/0x93 Aug 22 21:47:25 web01 kernel: [1333920.765700] [<c10b382a>] ? do_sync_write+0xc0/0x107 Aug 22 21:47:25 web01 kernel: [1333920.765702] [<c104432e>] ? autoremove_wake_function+0x0/0x2d Aug 22 21:47:25 web01 kernel: [1333920.765706] [<c1102fe0>] ? security_file_permission+0xc/0xd Aug 22 21:47:25 web01 kernel: [1333920.765708] [<c10b376a>] ? do_sync_write+0x0/0x107 Aug 22 21:46:25 web01 kernel: [1333920.765710] [<c10b4134>] ? vfs_write+0x7e/0xd6 Aug 22 21:47:25 web01 kernel: [1333920.765712] [<c10b4224>] ? sys_write+0x3c/0x63 Aug 22 21:47:25 web01 kernel: [1333920.765715] [<c10030fb>] ? sysenter_do_call+0x12/0x28 Aug 22 21:48:32 web01 kernel: [1333987.640773] sd 0:0:0:0: timing out command, waited 180s Aug 22 21:48:32 web01 kernel: [1333987.640858] sd 0:0:0:0: [sda] Unhandled error code Aug 22 21:48:32 web01 kernel: [1333987.640860] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_OK Aug 22 21:48:32 web01 kernel: [1333987.640862] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 43 08 08 00 00 08 00 Aug 22 21:48:32 web01 kernel: [1333987.640867] end_request: I/O error, dev sda, sector 4392968 Aug 22 21:48:32 web01 kernel: [1333987.640928] Buffer I/O error on device sda3, logical block 1 Aug 22 21:48:32 web01 kernel: [1333987.640988] lost page write due to I/O error on sda3 Aug 22 21:48:32 web01 kernel: [1333987.641000] sd 0:0:0:0: timing out command, waited 180s
Your root filesystem (/) is mounted read-only as the /dev/disk/... line in /proc/mounts shows. The reason for this could be that a disk error was detected on boot (errors=remount-ro option) or subsequent I/O error. Check the kernel logs for any errors with the dmesg command and look in /var/log/syslog or /var/log/messages (but note that these files do probably not contain the last log entries). If there are any I/O errors, you may need to replace the disk. If not, boot to single user mode and run fsck.ext4 UUID=cf4fb4ae-6d12-407b-bf43-3b0daaaaaf7 to try to fix the errors. If fsck reports no errors and it is still read-only on reboot, you can run: sudo mount / -o remount,rw to try to mount the disk read-write. Looking at the log files in /var/log/ does not help much, as it is at the moment read-only. Often, the reason why /var/lib/dpkg/lock cannot be locked is that an automatic system update runs in the background, but in your case it is specifically complaining about a read-only filesystem.
Not able to lock /var/lib/dpkg/lock (read only)
1,412,351,566,000
I ended up dealing with a software meant to be deployed using dpkg. The .deb package works fine on the test env but fail on staging. Both are running the same version of Ubuntu but I am not 100% sure of the rest of the configs. How to debug this dpkg issue further? The installation fails like this: sudo dpkg -i --debug=7337 package.deb D000010: ensure_pathname_nonexisting `/var/lib/dpkg/tmp.ci' (Reading database ... 201812 files and directories currently installed.) Unpacking myProprietarySoftware (from package.deb) ... D000001: process_archive oldversionstatus=not installed D000002: fork/exec /var/lib/dpkg/tmp.ci/preinst ( install ) dpkg: error processing package.deb (--install): subprocess new pre-installation script returned error exit status 1 D000002: maintainer_script_new nonexistent postrm `/var/lib/dpkg/tmp.ci/postrm' D000010: ensure_pathname_nonexisting `/var/lib/dpkg/tmp.ci' D000010: ensure_pathname_nonexisting running rm -rf D000010: ensure_pathname_nonexisting `/var/lib/dpkg/reassemble.deb' Errors were encountered while processing: package.deb
The package's .preinst script is failing for some reason. To find out why, examine the script in /var/lib/dpkg/info/PACKAGENAME.preinst If you want to see exactly which line the script is failing on, edit the .preinst script and add set -x immediately after the #! line. This turns on execution tracing in the script. NOTE: This assumes that the .preinst script is a shell script (either posix sh or bash). Almost all .preinst (and .postinst, .prerm, and .postrm) scripts are shell scripts but they don't have to be, they could be any executable. e.g. on my main desktop machine with 9104 packages installed, 14 are perl scripts, 1 is a compiled executable (bash's preinst - it can't assume there is a functioning shell already installed), and all of the rest are shell scripts...9041 are POSIX shell scripts, 63 are bash scripts. If the .preinst is perl or python or something else, you'll have to figure out how to enable debugging or execution trace mode or similar in that language. Then run dpkg --configure --pending. This will cause dpkg to try to configure the half-installed package. DO NOT reinstall it with dpkg -i, that will overwrite your edited .preinst script with the version in the .deb package. This may give you enough information to fix the problem. It may be something simple like an unexpected or uncaught exit code from a program (most .preinst etc scripts have set -e, to make them terminate on the first error), or assuming that a directory already exists (and this may be due to an undeclared dependency in the package's debian/control file - i.e it should depend on foo but doesn't. just install foo anyway) Once it's fixed, run dpkg --configure --pending again, and the package should be properly installed. If the .preinst script is buggy, there's a reasonable chance that the .postinst (and/or .prerm and .postrm) scripts will be too. You may need to fix them as well. Don't forget to submit a bug report to whoever made the package so they can fix it.
dpkg: new pre-installation script returned error exit status 1
1,412,351,566,000
I have followed instructions from their site. The command ls /usr/local/hdf5 returns bin include lib share But dpkg -s hdf5 dpkg-query: package 'hdf5' is not installed and no information is available Why? I have downloaded from here https://www.hdfgroup.org/HDF5/release/obtainsrc.html#conf and then I have followed the INSTALL file instructions,from make to make install. How can I know for sure that HDF5 in installed or not?
The actual name of the hdf5 installation package is "libhdf5-dev" (not "hdf5"). Running the following command should return package information. dpkg -s libhdf5-dev If that doesn't give any results, you can check for any hdf5 installation by doing: dpkg -l | grep hdf5
How to check if HDF5 is installed?
1,412,351,566,000
I'm curious to understand how ~ is processed in a dependency by Apt or how it's defined for deb files (I'm not sure exactly where the syntax is defined). I ran into it with respect to dependencies of the Ubuntu (Focal) meta package python3 which has the dependency constraint: python3.8 >= 3.8.2-1~ (see here). I believe package versions are defined so that they lexically sort in order, but when I checked ubuntu focal, there is no version of python3.8 that sorts lexically >= 3.8.2-1~ but there is a version 3.8.10-0ubuntu1~20.04.4 inferring that either Ubuntu Focal's dependencies are broken (they are not) or there is some special meaning to ~ in a dependency. The only documentation I can find on the topic is Debian's Declaring relationships between packages. But this doesn't mention a ~ or pattern matching. So what is the meaning of the trailing ~ in a .deb dependency?
Tildes in versions are described in the section of Policy on versions. Basically, tildes sort before anything. Thus >= 3.8.2-1~ is satisfied by any version starting with 3.8.2-1, including versions with suffixes starting with a tilde themselves, such as 3.8.2-1~bpo (as would be used for backports), as long as there aren’t two tildes in a row. In fact such dependencies, with a tilde at the very end of the version (including the Debian revision), are typically used to facilitate backports. Since this is specifically what your question is about, and isn’t addressed by Debian Policy, it’s worth going into more detail. A typical version dependency would look like python3.8 >= 3.8.2-1, requiring version 3.8.2-1 or later of the python3.8 package. This would be satisfiable by any later upstream version of Python 3.8, and any later Debian revision of the package (3.8.2-2, or 3.8.2-1ubuntu1, etc.). But it wouldn’t be satisfied by backports, which have versions of the form 3.8.2-1~bpo10+1; since the tilde sorts before the empty string, 3.8.2-1~bpo10+1 is considered to be less than 3.8.2-1. Backporting packages using versioned dependencies of this form thus requires changing their dependencies, which goes counter to the general rule that backports should be as close as possible to the original package. So adding a tilde as the last character of a version in a versioned dependency helps relax the dependency slightly: it allows versions with the same prefix, and a tilde-separated suffix, to satisfy the versioned dependency. This is the opposite of the documented use of tildes for pre-releases, which result in versions which can’t satisfy strictly-versioned dependencies on the final release. (Note that a tilde as the last character in a version number which includes a Debian revision, as given in the question, can’t allow upstream pre-releases — those would look like 3.8.2~pre1-1, which is less than 3.8.2-1~.) Versions aren’t sorted lexically, they’re sorted by component, numerically if possible, lexically otherwise. Thus 3.8.10-0ubuntu1~20.04.4 does satisfy this relationship: 10 is greater than 2, so the dependency is satisfied and the comparison stops there.
What does a tilde (~) mean at the end of a dependency requirement in a deb file or in apt?
1,412,351,566,000
My binary depends on these boost libraries and respective packages: NAME | PACKAGE: --------------------------------------+----------------------------------- libboost_serialization.so.1.55.0 | libboost-serialization1.55.0 libboost_thread.so.1.55.0 | ibboost-thread1.55.0 libboost_date_time.so.1.55.0 | libboost-date-time1.55.0 libboost_signals.so.1.55.0 | libboost-signals1.55.0 So I'd like to define a list of packages: boostlibnames="libboost-serialization1.55.0 libboost-thread1.55.0 libboost-date-time1.55.0 libboost-signals1.55.0" And now I'd like to check if they are all installed and only then run actual apt-get install. I know apt will automatically check whether the packages are already installed, but I'd like to place in a prompt to the user whether he wants to install missing libraries before doing so. So is there a nice way to check whether all listed libraries (in variable as above) are installed?
The dpkg -s command returns the status of installed packages. For example, on my system, if I run it for firefox which is installed and nedit which isn't, I get: $ dpkg -s firefox Package: firefox Status: install ok installed Priority: optional Section: web Installed-Size: 94341 Maintainer: Clement Lefebvre <[email protected]> Architecture: amd64 Version: 41.0~linuxmint1+betsy Replaces: firefox-l10n-af, firefox-l10n-ar, firefox-l10n-be, firefox-l10n-bg, firefox-l10n-bn-bd, firefox-l10n-ca, firefox-l10n-cs, firefox-l10n-da, firefox-l10n-de, firefox-l10n-el, firefox-l10n-en-gb, firefox-l10n-en-us, firefox-l10n-eo, firefox-l10n-es, firefox-l10n-et, firefox-l10n-eu, firefox-l10n-fa, firefox-l10n-fi, firefox-l10n-fr, firefox-l10n-fy, firefox-l10n-gl, firefox-l10n-gu, firefox-l10n-he, firefox-l10n-hi, firefox-l10n-hr, firefox-l10n-hu, firefox-l10n-id, firefox-l10n-is, firefox-l10n-it, firefox-l10n-ja, firefox-l10n-kn, firefox-l10n-ko, firefox-l10n-lt, firefox-l10n-lv, firefox-l10n-nb, firefox-l10n-nl, firefox-l10n-nn, firefox-l10n-pl, firefox-l10n-pt, firefox-l10n-pt-br, firefox-l10n-ro, firefox-l10n-ru, firefox-l10n-sk, firefox-l10n-sl, firefox-l10n-sq, firefox-l10n-sr, firefox-l10n-sv, firefox-l10n-th, firefox-l10n-tr, firefox-l10n-uk, firefox-l10n-zh Provides: gnome-www-browser, www-browser Breaks: firefox-l10n-en-us Description: The Firefox web browser The Mozilla Firefox Web Browser. $ dpkg -s nedit dpkg-query: package 'nedit' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. So, you can use that command to check whether a package is installed: #!/usr/bin/env bash run_install() { ## Prompt the user read -p "Do you want to install missing libraries? [Y/n]: " answer ## Set the default value if no answer was given answer=${answer:Y} ## If the answer matches y or Y, install [[ $answer =~ [Yy] ]] && apt-get install ${boostlibnames[@]} } boostlibnames=("libboost-serialization1.55.0" "libboost-thread1.55.0" "libboost-date-time1.55.0" "libboost-signals1.55.0" "nedit") ## Run the run_install function if sany of the libraries are missing dpkg -s "${boostlibnames[@]}" >/dev/null 2>&1 || run_install
Check if all listed packages are installed in bash
1,412,351,566,000
There are many packages which have grub in their names and part of the GRUB (the Grand Unified Boot Loader). The ones which are installed on my system are - grub-common grub-emu grub-pc grub-pc-bin grub-theme-starfield grub2 grub2-common grub2-splashimages I first looked at it to see whether it is a symlinked file or a regular file - [$] ll -h /etc/default/grub -rw-r--r-- 1 root root 1.2K 2017-01-22 14:16 /etc/default/grub I had a look but couldn't find anything which would tell me where this file comes from ? [$] dpkg -S /etc/default/grub dpkg-query: no path found matching pattern /etc/default/grub OR [$] dpkg-query -W /etc/default/grub dpkg-query: no packages found matching /etc/default/grub
In such cases you can find the relevant package by looking through the post-installation scripts: grep /etc/default/grub /var/lib/dpkg/info/*.postinst This reveals that the file is created by grub-pc.
In Debian, which package is responsible for creation of /etc/default/grub?
1,412,351,566,000
Essentially, I'm using this answer to have a non-interactive experience with application such as dpkg, apt and other ones that may depend on the former. problem though is, is there any conflict between those two flags, when used together? I'm asking because, as i understand it: apt-get -o Dpkg::Options::="--force-confdef" Use the default setting (depending on package, i believe some either replace old config, and some leave the old one, unless I'm mistaken) and apt-get -o Dpkg::Options::="--force-confnew" Keep the new config instead... So I'm a bit confused as to why certain sources mention two of these flags, even though they may or may not conflict with each other (tried them but don't know any packages that would launch debconf unless i run dist-upgrade and wait for the right package to do that). Do i just need a single one of those instead or both?
This is addressed in the dpkg man page: confnew: If a conffile has been modified and the version in the package did change, always install the new version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred. confold: If a conffile has been modified and the version in the package did change, always keep the old version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred. confdef: If a conffile has been modified and the version in the package did change, always choose the default action without prompting. If there is no default action it will stop to ask the user unless --force-confnew or --force-confold is also been given, in which case it will use that to decide the final action. --force-confdef on its own will sometimes result in prompting, because a default action isn’t always specified. This can be fixed by adding --force-confnew or --force-confold; when combined with --force-confdef, these don’t replace it, they complement it — the chosen action will be the default, if any, and either the new or old action otherwise (depending on which option was chosen).
Any possible conflict between using both --force-confold and --force-confnew with dpkg?
1,412,351,566,000
I want to install MySQL 5.7 on Travis CI, which runs Ubuntu 12 virtual machines. I'm willing to use the official MySQL APT repo: wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb But the problem is, installing this package opens an interactive menu asking the following question: Which Server version do you wish to receive? - mysql-5.6 - mysql-5.7-dmr As the installation is part of an automated script, I'm not behind the terminal to answer the question. The only thing I can find in the doc is: Selecting a Major Release Version By default, all installations and upgrades for your MySQL server and the other required components come from the release series of the major version you have selected during the installation of the configuration package (see Adding the MySQL APT Repository). However, you can switch to another supported major release series at any time by reconfiguring the configuration package you have installed. Use the following command: shell> sudo dpkg-reconfigure mysql-apt-config But again, this opens an interactive menu. How to install this APT repository and configure it to use mysql-5.7-dmr, on a non-interactive shell?
Courtesy @hbdgaf, this how-to put me on the right track: export DEBIAN_FRONTEND=noninteractive echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb I put together this gist for the whole process.
How to configure the MySQL APT repo on Ubuntu, on a non-interactive shell?
1,412,351,566,000
I don't use Windows all that often, but I've found my self in a position where I'm stuck in front of one quite a bit temporarily. So I've been investigating Cygwin. My question is dpkg available for Cygwin? My Google searches seem to show that it was at least at one point, but I can't find a package. If it isn't availiable as a package does anyone have any tips/experience getting it running? I'm not trying to create a Cygwin Debian port (although it sounds as if this was attempted in the past). At the minimum, I'd simply like to be able to build Debian source packages while on the Windows machine. (Yes, I know I could ssh over to a Debian box.) Cygwin is apparently on topic here, but it might not be the best place for this question. I hope this is ok...
An attempt to get dpkg working has been abandoned, according to THIS sourceforge page that was setup to investigate getting dpkg to work on Windows Cygwin. Stick to a Virtual Box instance or SSH. EDIT: If you are really interested, there is a huge thread about trying to get it work here.
Is dpkg available for Cygwin?
1,412,351,566,000
This is with reference to "sudo: apt-get: command not found." after removing some packages. This user managed to break his system by installing some packages from wheezy on a squeeze system - not sure why or how. In any case, he has at least two packages which are not fully installed, and are in the state iU (i.e. unpacked only). What is an efficient way to list all packages that are not fully installed, or, putting it differently, partially installed? This seems like something that might have already been asked, but a quick search did not uncover anything. If it is a duplicate, please close.
From the dpkg man page -C, --audit Searches for packages that have been installed only partially on your system. dpkg will suggest what to do with them to get them working. So dpkg -C (as user) may work. However, I can't test this since I don't have any broken packages.
Listing Debian packages which are not fully installed
1,421,928,404,000
In Linux distributions, some packages create user accounts. How can I determine which package created a given user? I want to know specifically for Fedora and Ubuntu, but answers for other distributions are welcome.
On Debian-based systems (including Ubuntu), packages create users using maintainer scripts, usually postinst. Therefore one way could be to grep through these scripts: grep -R --include='*.postinst' -e useradd -e adduser /var/lib/dpkg/info/ This assumes, of course, that the postinst script hasn't been deleted (either manually or because you uninstalled the package in question). Debian policy seems to favour postinst: [Y]ou must arrange for your package to create the user or group if necessary using adduser in the preinst or postinst script (again, the latter is to be preferred if it is possible). The package maintainer can use preinst as well, as long as adduser is a pre-dependency. The policy also leads us to the other source of accounts: the base-passwd package, as it states in the preceding paragraph: If you need a statically allocated id, you must ask for a user or group id from the base-passwd maintainer, and must not release the package until you have been allocated one. Once you have been allocated one you must either make the package depend on a version of the base-passwd package with the id present in /etc/passwd or /etc/group, or arrange for your package to create the user or group itself with the correct id (using adduser) in its preinst or postinst. (Doing it in the postinst is to be preferred if it is possible, otherwise a pre-dependency will be needed on the adduser package.) The base-passwd documentation (/usr/share/doc/base-passwd/users-and-groups.txt.gz or /usr/share/doc/base-passwd/users-and-groups.html) says: The Debian base-passwd package contains the master versions of /etc/passwd and /etc/group. The update-passwd tool keeps the entries in these master files in sync on all Debian systems. They comprise only "global static" ids: that is, those which are reserved globally for the benefit of packages which need to include files owned by those users or groups, or need the ids compiled into binaries. The users/groups included are (grepped out from /usr/share/doc/base-passwd/users-and-groups.txt.gz): Users (usually with corresponding groups) root man majordom irc gdm daemon lp postgres gnats saned bin mail www-data nobody klog sys news backup messagebus syslog sync uucp operator postfix games proxy list haldaemon Groups (without corresponding users) adm fax audio staff sshd tty voice src users fetchmail disk cdrom shadow lpadmin cupsys kmem floppy utmp sasl nogroup dialout tape video scanner dip sudo plugdev ssh The package README (/usr/share/doc/base-passwd/README) also lists out some users with UIDs in the 60000-64999 range, and states that these are created by the respective packages.
How to find out which package a user belongs to?
1,421,928,404,000
I just did an apt-get upgrade on my Debian 6 development server and noticed that a certain package named tinyproxy was upgraded. I have a particular interest in seeing precisely what changed in that package because modifying it to do some things that it currently does not do is on my list of things to do. I know that I can fire up my browser, dig a little, find the changelog and see exactly what changed in the version I just went to, but then I wondered if there's a way I could ask apt-get or dpkg to show me a changelog if one was included. Can I use either tool, or perhaps another to get a summary of what changed between versions of a package via the command line?
You're looking for the package apt-listchanges. That will show you the Debian news and/or changelogs (its configurable) of the packages you're about to upgrade, and optionally ask for confirmation before upgrading. It can even open the changelogs in a browser, so you can click on links to bugs, etc. Also, if you're using aptitude, press C when you have a package selected to see the changelog. As long as you have libparse-debianchangelog-perl installed, it'll even highlight which entries are new (aptitude recommends that Perl package). Finally, you can read both the Debian and upstream changelogs in /usr/share/doc/packagename/.
Can I determine what changed in an upgraded package using apt or dpkg on Debian 6?
1,421,928,404,000
I'm trying to install Awesome's dependencies, specificall libxcb (using Ubuntu 16.04.1). What I did is run: cd ~/Downloads apt-get source libxcb sudo apt-get build-dep libxcb cd libxcb-1.11.1/ dpkg-buildpackage -us -uc Is this the right procedure to build libxcb? Now I have a big list of *.deb files (see below). Which one should I install via sudo dpkg -i *.deb? ~/Downloads$ ls -a . libxcb-render0-dev_1.11.1-1ubuntu1_amd64.deb .. libxcb-res0_1.11.1-1ubuntu1_amd64.deb awesome-4.0 libxcb-res0-dbg_1.11.1-1ubuntu1_amd64.deb awesome-4.0.tar.xz libxcb-res0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-1.11.1 libxcb-screensaver0_1.11.1-1ubuntu1_amd64.deb libxcb1_1.11.1-1ubuntu1_amd64.deb libxcb-screensaver0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb_1.11.1-1ubuntu1_amd64.changes libxcb-screensaver0-dev_1.11.1-1ubuntu1_amd64.deb libxcb_1.11.1-1ubuntu1.diff.gz libxcb-shape0_1.11.1-1ubuntu1_amd64.deb libxcb_1.11.1-1ubuntu1.dsc libxcb-shape0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb_1.11.1.orig.tar.gz libxcb-shape0-dev_1.11.1-1ubuntu1_amd64.deb libxcb1-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-shm0_1.11.1-1ubuntu1_amd64.deb libxcb1-dev_1.11.1-1ubuntu1_amd64.deb libxcb-shm0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb1-udeb_1.11.1-1ubuntu1_amd64.udeb libxcb-shm0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-composite0_1.11.1-1ubuntu1_amd64.deb libxcb-sync1_1.11.1-1ubuntu1_amd64.deb libxcb-composite0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-sync1-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-composite0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-sync-dev_1.11.1-1ubuntu1_amd64.deb libxcb-damage0_1.11.1-1ubuntu1_amd64.deb libxcb-xevie0_1.11.1-1ubuntu1_amd64.deb libxcb-damage0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xevie0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-damage0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xevie0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-doc_1.11.1-1ubuntu1_all.deb libxcb-xf86dri0_1.11.1-1ubuntu1_amd64.deb libxcb-dpms0_1.11.1-1ubuntu1_amd64.deb libxcb-xf86dri0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-dpms0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xf86dri0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-dpms0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xfixes0_1.11.1-1ubuntu1_amd64.deb libxcb-dri2-0_1.11.1-1ubuntu1_amd64.deb libxcb-xfixes0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-dri2-0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xfixes0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-dri2-0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xinerama0_1.11.1-1ubuntu1_amd64.deb libxcb-dri3-0_1.11.1-1ubuntu1_amd64.deb libxcb-xinerama0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-dri3-0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xinerama0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-dri3-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xkb1_1.11.1-1ubuntu1_amd64.deb libxcb-glx0_1.11.1-1ubuntu1_amd64.deb libxcb-xkb1-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-glx0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xkb-dev_1.11.1-1ubuntu1_amd64.deb libxcb-glx0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xprint0_1.11.1-1ubuntu1_amd64.deb libxcb-present0_1.11.1-1ubuntu1_amd64.deb libxcb-xprint0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-present0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xprint0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-present-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xtest0_1.11.1-1ubuntu1_amd64.deb libxcb-randr0_1.11.1-1ubuntu1_amd64.deb libxcb-xtest0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-randr0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xtest0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-randr0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xv0_1.11.1-1ubuntu1_amd64.deb libxcb-record0_1.11.1-1ubuntu1_amd64.deb libxcb-xv0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-record0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xv0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-record0-dev_1.11.1-1ubuntu1_amd64.deb libxcb-xvmc0_1.11.1-1ubuntu1_amd64.deb libxcb-render0_1.11.1-1ubuntu1_amd64.deb libxcb-xvmc0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-render0-dbg_1.11.1-1ubuntu1_amd64.deb libxcb-xvmc0-dev_1.11.1-1ubuntu1_amd64.deb
The way you built libxcb is OK, but as Julie Pelletier says you didn't need to build it from source. The general approach in a case like this is to use apt-cache search; apt-cache search libxcb will list all the libxcb-related packages (and a few others which happen to mention libxcb) along with their short descriptions. You can then match these up with the awesome requirements; assuming you're building the latter from source: sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev will install the required libraries and development files. The build dependencies of the existing awesome package can serve as a useful guide to get started on the remaining dependencies.
How to install libxcb
1,421,928,404,000
I understand that a package has two components: config and data files. During package upgrade (i.e. security upgrade) data files can be overwritten, but config files should always stay the same. Also config files are usually in /etc and data in /usr. Sometimes, however, the distinction is blurred. In my case, I have modified the icon file for Icedove (Thunderbird): /usr/share/applications/icedove.desktop Now, every time there is a Icedove (Thunderbird) update, my changes get overwritten with the default file (even if it has not changed between updates). Is there any way to prevent this particular file from being overwritten? Setting it to immutable with chattr +i icedove.desktop is not a good idea, as it produces error during package upgrade.
While wurtel's answer answers the question as phrased, considering the background in the question reveals that this is yet another case of a XY problem. In this particular case, /usr/share/applications/icedove.desktop should not be modified in the first place, but a local configuration file which overrides the default configuration should be placed in a suitable location. Systems which are freedesktop.org-compliant conform to the XDG Base Directory Specification, the purpose of which is precisely to eliminate the need for modifying configurations files that are overwritten during package upgrades. If the configuration is intended to be system-wide, the local icedove.desktop should be placed in the applications subdirectory for a search path preceding /usr/share in $XDG_DATA_DIRS. The value of this environment variable defaults to /usr/local/share/:/usr/share/, but the actual value varies between distributions. Because in this case the configuration is intended to be local the correct location is /usr/local/share/applications/icedove.desktop, although keep in mind that they may be distribution specific overrides in place which might have preference over configurations under usr/local/share. On the other hand, if the configuration is indented to be user specific, the local icedove.desktop should be placed under applications in the location indicated by $XDG_DATA_HOME. This usually defaults to $HOME/.local/share, i.e. the location for the configuration file should be $HOME/.local/share/applications/icedove.desktop.
Debian: prevent particular file from being overwritten during package upgrade
1,421,928,404,000
I am installing packages on remote server, using ssh: ssh root@my-host "DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get --quiet --yes install w3m" even though I have set DEBIAN_FRONTEND=noninteractive, the installation gets stuck on following question, and I have to press enter manually: Configuration file '/etc/w3m/config' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** config (Y/I/N/O/D/Z) [default=N] ? I suspect, the question is being asked by dpkg --configure -a and not by apt-get and therefore noninteractive is ignored. How can I automate this and have default option selected automatically, without being asked ?
This kind of configuration file change conflict is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation though: Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system. To provide this option when dpkg is invoked by APT, you need to add it to the APT settings, for example by adding the following line to /etc/apt/apt.conf: DPkg::options { "--force-confdef"; }; or, for a single invocation: apt-get -o DPkg::Options::=--force-confdef ... DEBIAN_FRONTEND=noninteractive only affects debconf, and that’s not involved at all in this scenario.
Force non-interactive "dpkg --configure" when using apt-get install
1,421,928,404,000
I am running debian stretch and following this guide for building package from source for debian. Sometimes building process takes hours , when I run dpkg-buildpackage -rfakeroot again , it starts building from scratch. dpkg-buildpackage --help does not show any option to resume. How can I resume package building ?
To continue a build that was interrupted for some reason, you can call the appropriate targets of debian/rules directly: debian/rules build will compile the sources, then fakeroot debian/rules binary will run the installation and prepare the packages.
How to resume package building in debian?
1,421,928,404,000
I have created a package of zsh 5.0.7 from sources and now I can install it successfully but when I try to remove it I get this: $ sudo dpkg -i zsh_5.0.7_amd64.deb Selecting previously unselected package zsh. (Reading database ... 177638 files and directories currently installed.) Preparing to unpack zsh_5.0.7_amd64.deb ... Unpacking zsh (5.0.7) ... Setting up zsh (5.0.7) ... Processing triggers for man-db (2.7.0.2-2) ... Reading package lists... Building dependency tree... $ sudo apt-get purge zsh Reading state information... The following packages will be REMOVED: zsh* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 6473 kB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 178746 files and directories currently installed.) Removing zsh (5.0.7) ... dpkg: warning: while removing zsh, directory '/usr/local/bin' not empty so not removed dpkg: warning: while removing zsh, directory '/usr/local/lib' not empty so not removed dpkg: warning: while removing zsh, directory '/usr/local/share/man/man1' not empty so not removed Processing triggers for man-db (2.7.0.2-2) ... What can I change in packaging (debian/{control,rules} or other files) to make that warning go away ? debian/control Source: zsh Section: unknown Priority: optional Maintainer: Patryk <[email protected]> Build-Depends: debhelper (>= 8.0.0), autotools-dev Standards-Version: 3.9.4 Homepage: http://zsh.sourceforge.net/ Package: zsh Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libc6 Description: ZSH shell Zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added. debian/rules #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with autotools-dev override_dh_auto_configure: ./configure override_dh_usrlocal: EDIT I have forked zsh sources and added debian directory for packaging: https://github.com/pmalek/zsh/tree/5.0.7-deb/debian
In general, this warning is completely harmless and normal. When dpkg is removing (or trying to remove) a package, it removes all files and directories which were created as part of that package installation. Now, suppose there are some files in a directory that is a candidate for removal in such a scenario, and dpkg doesn't know about these files. This could happen either because they were machine generated, either during or after the install, or because they were created by a user. Then, unless instructed, dpkg will not remove those files. Since, by default, it will not remove a non-empty directory, in such a case, the directory containing these files will not be removed. So, in summary, after the package is removed, you may end up with a basically empty directory (or directories) with a few machine generated files or something. This is not a problem - you can just remove these manually. Note, the defaults above are all sensible defaults. There are no bugs here. In your case, you are installing files to /usr/local as part of your Debian binary package, which is a violation of the File Hierarchy Standard, and is wrong. Don't do this. User binaries should go into /usr/bin, for example, libraries should go into /usr/lib, etc. I assume your package creates /usr/local/bin, because dpkg, naturally, does not know about it already. (Since a Debian package containing files/directories in /usr/local is a violation of the FHS and therefore Debian Policy). Therefore it tries to remove that file when it removes the package. Stop installing in /usr/local, and your problem will go away. Give us a little more context, perhaps? Why are you trying to build your own zsh Debian package rather than using the one your distribution ships, and what distribution are you using anyway? If you really want to do this, here is a simple tip. Check how your distribution (or even Debian) packages zsh, and just reuse the packaging. It should work fine. There is no reason to try writing your own, unless you are trying to learn how to package, which I assume is not the case here.
After creating a .deb: dpkg:warning while removing, directory /usr/local/bin not empty so not removed
1,421,928,404,000
A trivially conflicting package foo can be made to work with bar, by running dpkg --force-conflicts -i foo. But eventually it's time to upgrade, and 'apt-get' objects: % apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: foo : Conflicts: bar but 0.2-1 is installed E: Unmet dependencies. Try using -f. Can apt-get be tweaked/forced to tolerate the (pretty much fixed) conflict, then upgrade? (Quickie existence proof: uninstall foo, then upgrade, then reinstall foo as before. Therefore it is possible, the question is finding the least cumbersome mechanism.) An example, but this question is not about any two particular packages. For several years GNU parallel has had a trivial conflict with moretutils; each provides /usr/bin/parallel. dpkg can force co-existence: # assume 'moreutils' is already installed, and 'parallel' is in # apt's cache directory. dpkg --force-conflicts -i /var/cache/apt/archives/parallel_20141022+ds1-1_all.deb This creates a diversion, renames the moreutils version to /usr/bin/parallel.moreutils. Both programs work, until the user upgrades. I tried an -o option, but that didn't bring on peace: apt-get -o Dpkg::Options::="--force-conflicts" install parallel moreutils Possible -o options number in the hundreds, however...
Since OP asked for a list of commands (with which to change the relevant metadata of the package) in the comments to Gilles' answer, here it is: # download .deb apt download parallel # alternatively: aptitude download parallel # unpack dpkg-deb -R parallel_*.deb tmp/ # make changes to the package metadata sed -i \ -e '/^Version:/s/$/~nomoreutconfl/' \ -e '/^Conflicts: moreutils/d' \ tmp/DEBIAN/control # pack anew dpkg-deb -b tmp parallel_custom.deb # install dpkg -i parallel_custom.deb This is under the assumptions that the conflicts line only has moreutils as an entry (and without version restrictions) as was the case in my installation. Otherwise, use '/^Conflicts:/s/\(, \)\?moreutils\( [^,]\+\)\?//' as the second sed script to only remove the relevant part of the line and support version restrictions. Your installed package won't be overwritten by newer versions from the repository and you have to manually repeat this procedure for every update to the GNU parallel package if you want to keep this package up-to-date.
Set apt-get options to tolerate harmless 'dpkg --force-conflicts' kludge?
1,421,928,404,000
Let's say I have an installed, working and up-to-date system, and want to verify that all package-installed files on it are the same as those packaged by the respective package maintainer. In effect, I want a list of files that are somehow different between what I have installed "now" and what I would get if I were to reinstall using the same set of packages on a blank system. Short of actually reinstalling and comparing the outcome, how would I generate such a list of files? I realize that some differences (configuration files, for example) are to be expected, but that's okay. I'm primarily interested in Debian Wheezy, but a good answer would explore a solution that works with any reasonably modern Linux distribution based around the same package management infrastructure (apt, dpkg and friends).
One way to accomplish this is to use the command debsums. $ debsums <package> Example $ debsums xz-utils /usr/bin/lzmainfo OK /usr/bin/xz OK /usr/bin/xzdiff OK /usr/bin/xzgrep OK /usr/bin/xzless OK /usr/bin/xzmore OK /usr/share/doc/xz-utils/NEWS.Debian.gz OK /usr/share/doc/xz-utils/README.Debian OK /usr/share/doc/xz-utils/README.gz OK /usr/share/doc/xz-utils/copyright OK /usr/share/doc/xz-utils/extra/7z2lzma/7z2lzma.bash OK /usr/share/doc/xz-utils/extra/scanlzma/scanlzma.c OK /usr/share/doc/xz-utils/faq.txt.gz OK /usr/share/doc/xz-utils/history.txt.gz OK /usr/share/man/man1/lzmainfo.1.gz OK /usr/share/man/man1/xz.1.gz OK /usr/share/man/man1/xzdiff.1.gz OK /usr/share/man/man1/xzgrep.1.gz OK /usr/share/man/man1/xzless.1.gz OK /usr/share/man/man1/xzmore.1.gz OK
How to verify that package-installed files match originals?
1,421,928,404,000
I know that apt-get source <package_name> gives you the source package. It contains a debian folder with a file called rules. If I understand it correctly, this file describes how the source package can be transformed into a .deb package, including which compiler flags should be used. Two questions: How do I get the compiler flags that are actually used? Is it necessary to run make -n (if this is even possible) or can I get them somehow by parsing the document(s) ? Given the case of a source package from an official repository. Are the compiler flags a 100% determined by the rules file or do they depend on the system that the .deb creation is done on? Do I need to 'mirror' the official build system to get to the same flags that were used in the official .deb building process? How can I do this? I learned here, that debian does not have an official policy which compiler flags are used for the .deb-packed binaries.
The compiler flags used are a function of the debian/rules file, the package's build files (since the upstream author may specify flags there too), the build system used (dh, cdbs etc.), the default compiler settings. To see the flags used you effectively need to at least compile the package: debian/rules build Trying things like debian/rules -n generally won't take you very far; for instance on a dh-based package it will just say dh build or something similar; asking dh to show what that would do (with --no-act) will produce dh_testdir dh_auto_configure dh_auto_build and so on. There is no fool-proof, easy-to-explain way to determine the build flags by reading debian/rules; you can get some idea by looking for flags set there, and also (where appropriate) by looking for options for dpkg-buildflags (such as DEB_BUILD_MAINT_OPTIONS) and running that. For many packages the easiest way to see what flags were used is to look at the build logs for the packages shipped in the archives, starting from https://buildd.debian.org. For example the logs for coreutils on i386 show that the flags used were -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security for compilation, and -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,--as-needed -Wl,-z,relro for linking (thanks to Faheem Mitha for pointing out the latter!).
How to get the compiler flags that are used to build the binaries in a (.deb) package?
1,421,928,404,000
There's a .deb software that doesn't have a .desktop file, I created that file. I want to create another package for that software, when the user installs it, I want the .desktop file to be generated automatically and placed in /usr/share/applications/ How to do so?
Sounds like all you want to do is extract your .deb archive, add your .desktop file and the rebuild the package. This is a fairly simple process. To extract: dpkg-deb -R package.deb extract_dir Note -R is a raw extract to get the control files as well. Next create /usr/share/applications/ if it doesn't already exist: mkdir -p extract_dir/usr/share/applications/ Then just add your .desktop file (be careful the name isn't going to conflict with anything else you are likely to install) and rebuild: cp desktop_file.desktop extract_dir/usr/share/applications/ dpkg-deb -b extract_dir package_new.deb Note you can also use dpkg-deb -b extract_dir . to create the package with its canonical name, but you will probably have to move your original out of the way first or else it will be clobbered. Sources: www.debian.org/doc/debian-policy/ap-pkg-binarypkg.html man dpkg-deb
How to automatically generate .desktop file?
1,421,928,404,000
I am reading an Ubuntu 14 hardening guide and this is one of the suggestions: It generally seems like a sensible idea to make sure that only users in the sudo group are able to run the su command in order to act as (or become) root: dpkg-statoverride --update --add root sudo 4750 /bin/su I looked up the dpkg-statoverride command but I still can’t figure out exactly what the command above is doing? It seems to imply that Ubuntu 14 by default allows anyone to sudo. To test, I created a new user, logged in as that user, tried to sudo and it failed – which is good. So what is the purpose of the suggestion above?
The purpose is to prevent ordinary users from running the su command (su is similar to sudo, the difference being that sudo executes one command, su starts a new session as a new user, which lasts until that user runs exit) The default mode of su is 4755 or rwsr-xr-x, the "s" means that the command is set-UID (which means that it always runs as the user who owns it, rather than the user who happens to execute it. In this case su is owned by root, so it always runs with root privileges) su has its own security measures in place to ensure that the user who executes it has authority to become another user (typically by asking for the other user's password), but it's conceivable that there would be a security vulnerability in su that would allow an attacker to somehow convince it to do something else without authority. By changing the mode to 4750, it prevents ordinary users (users other than root and those in the sudo group) from even reading or executing it in the first place, so an attacker would need to either change the ownership of that file, or change the mode of the file, or change their own effective UID/GID before they could even attempt to exploit this theoretical vulnerability in su. The dpkg-statoverride command is useful in this instance because it directs the package manager to use those ownership/mode values for that file, even if it gets replaced by a newer version (i.e. via apt upgrade). In other words, it makes it more permanent than just a chown and chmod. Here's a general-purpose tactic I recommend for this instance: Whenever I'm tweaking configuration of su/sudo or any authentication component on a Linux/UNIX machine, I'll open up another ssh/putty session to that server and log in as the root user, and just leave that session open in another window. That way if I do screw something up and lock myself out, I've already got a login session where I can fix anything I broke.
How to harden su with dpkg-statoverride?
1,421,928,404,000
I've created a deb package which installs a service. On our embedded devices, I want this package to automatically enable the service. On our developer workstations, I want the developers to systemctl start foo manually (it's a heavy service, and so it just consumes resources if run all of the time on a desktop environment). How can I go about prompting the user for their decision during the apt-get step? Is that the best solution? Note, I've created the package using dh_make and debhelper and enabled it with: %: dh $@ --with=systemd override_dh_systemd_enable: dh_systemd_enable --name=foo foo.service
You can use systemd presets to affect whether a systemd service will default to being enabled or disabled at installation time. The Debian presets default to enabling all services as they're installed, so you only need to ship a preset to the development workstations (the default behavior matches what you want to happen in production), by shipping a file such as /etc/systemd/system-preset/80-foo.preset containing a line that says disable foo.service If you manage your developer workstations using a system such as Puppet, Chef, Ansible, etc., you can use them to ship such a systemd preset configuration, that should make it easy for you to apply the policy to developer workstations only and not production machines. Your .deb package should use the systemctl preset command to enable the service, since that command will respect the preset configuration. As @JdeBP and @sourcejedi point out, the Debian macros in deb-helpers (such as dh_systemd_enable) do that already, they invoke deb-systemd-helper which will use systemctl preset by default (with a small caveat that if you remove (but do not purge) the package, and later re-install it, it will then not enable the service, even if you remove the preset file.) See this comment in deb-systemd-helper's enable operation: # We use 'systemctl preset' on the initial installation only. # On upgrade, we manually add the missing symlinks only if the # service already has some links installed. Using 'systemctl # preset' allows administrators and downstreams to alter the # enable policy using systemd-native tools. For more information on the systemd feature of presets, see the man page of systemd presets and of the command systemctl preset which implements it.
Conditionally enabling systemd files through Debian packaging
1,421,928,404,000
This question appears to be addressed properly in several questions and other places easily found with Google, but I don't find the solution satisfactory for the reasons explained below. But just for completion, I've included some relevant links: https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get https://askubuntu.com/questions/428772/how-to-install-specific-version-of-some-package/428778 https://askubuntu.com/questions/26498/choose-gcc-and-g-version ... And others. However, this question is regarding installing a very specific version of GCC in Kali Linux, which does not appear readily available as a specific package. In particular, the question is regarding how to install version 6.3.0, as I need this version to compile a particular program: https://www.reddit.com/r/Monero/comments/6d0ah8/xmrig_miner_new_release/ (as a bonus question, if there is a more sane way to fix this particular issue without using a different version of GCC, feel free to answer, but I believe this question is general and I would like to know how to do it regardless of how to make the aforementioned program link correctly) The versions which are available to install of any package, e.g. gcc, can be determined with: apt-cache showpkg gcc Which will list the available versions under "versions:", e.g. 4:7.2.0-1d1 4:4.9.2-2 Installation is then as simple as issuing apt-get install gcc:4:4.9.2-2 This will install the older version 4:4.9.2-2, by simply (I believe) overwriting the 7.2.0-1d1 install, if present. To get version 4:4.9.2-2 available at all, I had to add deb http://old.kali.org/kali sana main non-free contrib to my /etc/apt/sources.list file and then run apt-get update. However, what if the version I need is not listed? I've been experimenting with various sources, e.g. those found here: http://snapshot.debian.org/ and at various other questions and websites from Google searches. Most of them give me ignore or errors, e.g. as follows Ign:3 http://snapshot.debian.org/archive/debian/20091004T111800Z lenny InRelease Even if this would work, it seems to be a very bad approach to get a particular version installed, as adding some arbitrary source might not have the particular version I want. If I search on snapshot.debian.org for gcc, I get only very old versions: http://snapshot.debian.org/package/gcc/ I eventually became frustrated with this approach and compiled GCC 6.3.0 from the source tarball. The compilation was successful, but then I'm faced with how to install it. I'm cautious about running make install as I fear it will tamper with apt and dpkg and possibly break the system. Instead, I attempted to run it from the build directory, directly. I tried to simply add the build directory as the first entry in my PATH, which didn't work. Then, I attempted to rename /usr/bin/gcc and do a symlink from /usr/bin/gcc to where my gcc-6.3.0 executable lives. This presents the following problem: cc: error trying to exec 'cc1': execvp: No such file or directory, which This was fixed with another entry in my PATH. Then, I get this error: /usr/include/stdio.h:34:21: fatal error: stddef.h: No such file or directory Which I assume is because of a missing entry in /usr/lib/gcc/x86_64-linux-gnu. I tried to make a symlink from 6 to 6.3.0, but this wasn't sufficient. I also tried to actually copy everything with cp -R, same result. This should be a 64-bit program, but I also considered the same for /usr/lib/gcc/i686-linux-gnu. I'm sure I could start doing strace to see where it attempts to open the files from, read log files, read the source, and eventually I imagine I'd be able to figure out how to hack together a poorly conceived solution. But it would be nice if someone could tell me how to do this in a sane manner.
How to install a specific version of GCC in Kali Linux? GCC 6 is available on kali linux it can be installed as follow : apt install g++-6 gcc-6 To switch between gcc6 and gcc7 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 1 --slave /usr/bin/g++ g++ /usr/bin/g++-7 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 2 --slave /usr/bin/g++ g++ /usr/bin/g++-6 update-alternatives --config gcc Sample output: There are 2 choices for the alternative gcc (providing /usr/bin/gcc). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/gcc-6 2 auto mode 1 /usr/bin/gcc-6 2 manual mode 2 /usr/bin/gcc-7 1 manual mode Press <enter> to keep the current choice[*], or type selection number: Select your default gcc version. on 2017-08-05 the gcc-6 version is upgraded from 6.3.0 to 6.4.0 . Installing xmrig following the build's instructions. apt-get install git build-essential cmake libuv1-dev libmicrohttpd-dev git clone https://github.com/xmrig/xmrig.git cd xmrig mkdir build cd build cmake .. make Building a specific gcc version 6.3.0 Download the tarball from the closest mirror : GCC Releases wget https://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.bz2 tar xvjf gcc-6.3.0.tar.bz2 cd gcc-6.3.0 apt build-dep gcc ./contrib/download_prerequisites cd .. mkdir objdir cd objdir $PWD/../gcc-6.3.0/configure --prefix=/usr/bin/gcc-6.3 --enable-languages=c,c++,fortran,go --disable-multilib make -j 8 make install Add gcc-6.3 to update-alternatives Important : The --disable-multilib option is required to configure and build gcc for the current architecture. GCC WIKI : Installing GCC
How to install a specific version of GCC in Kali Linux?
1,421,928,404,000
I am writing a debian package and need to prompt the user for some textual details(default password, etc), as well as some one-of-many choices("Pick one of the following: foo, bar"). Will shell scripts run in dpkg use read or select correctly, or do I need another solution? If so, please point me to a quick guide about it.
You should not use read, select or dialog yourself but use debconf instead which supports readline, dialog, gtk and even web frontends. This is much more flexible than your own system. If you are using dh for building your system it will automatically use dh_installdebconf and you'll just have to place your template in debian/package.config and don't have to adjust/modify your debian/rules file or postinst script. For a short introduction into debconf have a look at The Debconf Programmer's Tutorial.
Prompting for input in post-install script in dpkg
1,421,928,404,000
I'm on Debian and I want to re-partition my drive and reinstall. Is there an easy way to restore all currently installed packages after a fresh installation? I'm thinking of doing it by making a backup app list: #generate list of installed packages dpkg -l | awk '{ print $2 }' ORS="\n" | tail -n +6 > reinstallList.txt and then after doing a fresh install I should be able to do: #install from backup at reinstallList.txt sudo apt-get install $(< reinstallList.txt) Is there a better way of doing this?
According to the Debian wiki, you should run this command before the reinstall: dpkg --get-selections > /backup/installed-software.log Then, after reinstall, run this: dpkg --set-selections < /backup/installed-software.log apt-get dselect-upgrade Obviously, you should replace /backup/installed-software.log with the name of some file that you can keep during the reinstall process. Putting it on a thumb drive would be good. For more information, see the wiki: https://wiki.debian.org/ListInstalledPackages
Re-installing apps after a fresh install?
1,421,928,404,000
I'm having a package management problem: At some point, I must have interrupted an update or something, because the bluez package has broken. I've tried removing and/or reinstalling, but I get nothing but errors. I'm unable to perform any operations with apt as long as this package is broken. Output from my attempt to remove the package $ sudo aptitude remove bluez The following packages will be REMOVED: bluez The following partially installed packages will be configured: dictionaries-common dmsetup grub-pc ifupdown install-info rsyslog 0 packages upgraded, 0 newly installed, 1 to remove and 235 not upgraded. Need to get 0 B of archives. After unpacking 1,737 kB will be freed. dpkg: error processing bluez (--remove): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. configured to not write apport reports Errors were encountered while processing: bluez E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up install-info (4.13a.dfsg.1-8) ... /var/lib/dpkg/info/install-info.postinst: 32: /var/lib/dpkg/info/install-info.postinst: update-info-dir: not found dpkg: error processing install-info (--configure): subprocess installed post-installation script returned error exit status 127 Setting up ifupdown (0.7~alpha5+really0.6.15) ... /var/lib/dpkg/info/ifupdown.postinst: 122: /var/lib/dpkg/info/ifupdown.postinst: update-rc.d: not found dpkg: error processing ifupdown (--configure): subprocess installed post-installation script returned error exit status 127 Setting up locales (2.13-18) ... /var/lib/dpkg/info/locales.postinst: 64: /var/lib/dpkg/info/locales.postinst: locale-gen: not found dpkg: error processing locales (--configure): subprocess installed post-installation script returned error exit status 127 Setting up dictionaries-common (1.11.6) ... /var/lib/dpkg/info/dictionaries-common.postinst: 45: /var/lib/dpkg/info/dictionaries-common.postinst: update-dictcommon-aspell: not found dpkg: error processing dictionaries-common (--configure): subprocess installed post-installation script returned error exit status 127 Setting up grub-pc (1.99-12) ... /var/lib/dpkg/info/grub-pc.postinst: line 438: grub-mkdevicemap: command not found /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found /var/lib/dpkg/info/grub-pc.postinst: line 559: grub-install: command not found /var/lib/dpkg/info/grub-pc.postinst: line 669: update-grub: command not found dpkg: error processing grub-pc (--configure): subprocess installed post-installation script returned error exit status 127 Setting up dmsetup (2:1.02.65-1) ... /var/lib/dpkg/info/dmsetup.postinst: 8: /var/lib/dpkg/info/dmsetup.postinst: update-initramfs: not found dpkg: error processing dmsetup (--configure): subprocess installed post-installation script returned error exit status 127 Setting up rsyslog (5.8.5-1) ... /var/lib/dpkg/info/rsyslog.postinst: 45: /var/lib/dpkg/info/rsyslog.postinst: update-rc.d: not found dpkg: error processing rsyslog (--configure): subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing: install-info ifupdown locales dictionaries-common grub-pc dmsetup rsyslog I'm running Debian testing. Is this problem actually with this particular package, or is it a problem with dpkg? What do I need to do to fix my package manager?
I haven't encountered this message before, so I guess it's bluez-specific. Have you tried the reinstall the message is suggesting? apt-get install --reinstall bluez You might also try using dpkg to install/configure the bluez package from the apt cache. Look for the bluez package in /var/cache/apt. Install like this (as root): dpkg -i <bluez debian package>
debian: Remove or reinstall package in a very bad inconsistent state
1,421,928,404,000
I'm running elementary OS 0.2 (based on Ubuntu 12.04) and starting today I'm seeing a weird error when attempting to install/upgrade packages. Just now for example I did a: sudo apt-get update which worked fine, followed by a: sudo apt-get upgrade which attempted returned this: Setting up idle-python2.7 (2.7.3-0ubuntu3.5) ... Traceback (most recent call last): File "/usr/lib/python2.7/compileall.py", line 16, in <module> import struct File "/usr/lib/python2.7/struct.py", line 1, in <module> from _struct import * ImportError: No module named _struct dpkg: error processing idle-python2.7 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: idle-python2.7 E: Sub-process /usr/bin/dpkg returned an error code (1) What is going on? Obviously this is related to the python package but I can still run python scripts without issues. How can I fix this? Add Following the advice given in the answer I tried: sudo apt-get --reinstall install python python-support This returned: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/192 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 864980 files and directories currently installed.) Preparing to replace python 2.7.3-0ubuntu2.2 (using .../python_2.7.3-0ubuntu2.2_i386.deb) ... Unpacking replacement python ... Preparing to replace python-support 1.0.14ubuntu2 (using .../python-support_1.0.14ubuntu2_all.deb) ... Unpacking replacement python-support ... Processing triggers for man-db ... Processing triggers for doc-base ... Processing 1 changed doc-base file... Registering documents with scrollkeeper... Setting up idle-python2.7 (2.7.3-0ubuntu3.5) ... Traceback (most recent call last): File "/usr/lib/python2.7/compileall.py", line 16, in <module> import struct File "/usr/lib/python2.7/struct.py", line 1, in <module> from _struct import * ImportError: No module named _struct dpkg: error processing idle-python2.7 (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python (2.7.3-0ubuntu2.2) ... Setting up python-support (1.0.14ubuntu2) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/site.py", line 548, in <module> main() File "/usr/local/lib/python2.7/site.py", line 530, in main known_paths = addusersitepackages(known_paths) File "/usr/local/lib/python2.7/site.py", line 266, in addusersitepackages user_site = getusersitepackages() File "/usr/local/lib/python2.7/site.py", line 241, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/usr/local/lib/python2.7/site.py", line 231, in getuserbase USER_BASE = get_config_var('userbase') File "/usr/local/lib/python2.7/sysconfig.py", line 516, in get_config_var return get_config_vars().get(name) File "/usr/local/lib/python2.7/sysconfig.py", line 449, in get_config_vars import re File "/usr/local/lib/python2.7/re.py", line 105, in <module> import sre_compile File "/usr/local/lib/python2.7/sre_compile.py", line 14, in <module> import sre_parse File "/usr/local/lib/python2.7/sre_parse.py", line 17, in <module> from sre_constants import * File "/usr/local/lib/python2.7/sre_constants.py", line 18, in <module> from _sre import MAXREPEAT ImportError: cannot import name MAXREPEAT Errors were encountered while processing: idle-python2.7 E: Sub-process /usr/bin/dpkg returned an error code (1) so it's a no go.
I found a way to solve this issue by simply removing the idle-python2.7 package: sudo apt-get remove idle-python2.7 as stated here.
'ImportError: No module named _struct' error when managing packages
1,421,928,404,000
Let’s say I install a package using dpkg: sudo dpkg -i package-name.deb then without running the package binaries I just remove it: sudo dpkg -r package-name Is there anything harmful that can happen in this process? For example, any malicious configuration script in the .deb file? What are other possible threats that might happen?
Yes, packages can contain “maintainer scripts” which are run before and/or after installation. You can see the scripts, if any, by extracting the control archive from the package: dpkg-deb --ctrl-tarfile package-name.deb > control.tar tar tf control.tar or, if you know you want to extract the control archive’s contents: dpkg-deb -e package-name.deb package-control (which places the extracted files in a directory named package-control). They run as root and can do whatever the package author wants on your system. You should really consider that installing a package is equivalent to granting the maintainer (and anyone else involved in the package’s maintenance and build) root access to your system. Who do you trust?
Can installing an unknown deb package using sudo dpkg be harmful?
1,421,928,404,000
sudo dpkg --install some_stuff_all.deb Install the packages in the file some_stuff_all.deb. sudo dpkg --remove some_stuff_all.deb Displays the message: dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in ... Type dpkg-deb --help for help about manipulating *.deb files; Then this lists the individual files: dpkg-deb --contents some_stuff_all.deb How does one list the packages in a .deb file?
To get information about a package file: dpkg -I some_stuff_all.deb This gives you all available information about the file, including Package:, Version:, Depends:, Description:, etc. See dpkg --help for a summary of options, and man dpkg for details. Note that -I is actually a dpkg-deb option, but dpkg runs dpkg-deb for you when you give it dpkg-deb options. See dpkg-deb --help and man dpkg-deb too.
How does one list the packages in a .deb file?
1,421,928,404,000
Some days ago I downloaded a .deb file that does not have a descriptive name and I want to know which version it is before executing dpkg -i. I do not know if the same package also comes in a repository, so I am looking to extract this information from the actual file, rather than querying the repository's database.
To get lots of information about the package use -I or --info: dpkg-deb -I package.deb dpkg-deb --info package.deb To only get the version use, -f or --field: dpkg-deb -f package.deb Version dpkg-deb --field package.deb Version
How may I obtain information on a specific Debian package (.deb) file? [duplicate]
1,421,928,404,000
I am running Debian jessie stable in order to understand how the .deb package interacts with the system. What is the correct way to extract and install a packge_name.deb without the command dpkg?
You can unpack .deb files using the ar command (since .deb files are ar archives). ar x file.deb will start the process. That will give you three files, debian-binary control.tar [or similar] data.tar [or similar] The last two contain control metadata and then the actual package files and are tar archives (which may be compressed using gzip, bzip, etc.) You would be able to extract the control data, and the actual content from the last two files, and then in theory, copy the files to the correct places, but it would be non-trivial. The data archive contains the install scripts, so that would be a good place to start when looking for how it interacts with the system. I don't think there is a correct way to install a .deb file without using dpkg.
How to extract and install .deb without the command dpkg?
1,421,928,404,000
I am trying to find a good method to find the repository for each package that was stored on my system that can be easily parsed. Backstory: I have Debian wheezy systems and have setup the wheezy-backports repository, so I could get a newer version of a package. I made a mistake with my patterns in the pinning configuration, which I didn't notice. I pinned * for the backports repository. A few weeks later I issued a apt-get -y dist-upgrade and wasn't paying attention and upgraded far more packages to the wheezy-backports then I was interested in. I had backups, so I could easily restore things easily, but this situation made me really want to find a way to find which repository each package came from. About the closest method I have found so far is like this. apt-cache policy $(dpkg -l | awk '/ii/ {print $2}' ). Which is somewhat close, but ideally I would like to get a report like this for all the packages. Package<tab>Version<tab>Origin<tab>Suite Where Origin/Suite are the values from the repository Release files.
The following python script parse the output of apt-cache policy and generate the list of all installed packages with the output format Package<tab>Version<tab>Origin<tab>Suite apt-show-origins #!/usr/bin/env python # Should be written with python-apt # but for now parse the output of apt-cache policy import os import re command = "apt-cache policy $(dpkg -l | awk '/ii/ {print $2}' )" stream = os.popen(command); content = stream.readlines() getOrigin = False pkgList = [] #Parse the output generated by apt-cache for s in content: if(not s.startswith(' ')): pkg = type('', (), {})() #Create an empty object pkg.name = s[:-2] #Remove trailing ':\n' elif(getOrigin): pkg.origin = re.split('\s+',s)[2] pkg.suite = re.split('\s+',s)[3] pkgList.append(pkg) getOrigin = False elif(s.startswith(' ***')): pkg.version = re.split('\s+',s)[2] getOrigin = True #Display the list for pkg in pkgList: print pkg.name + '\t'\ + pkg.version + '\t'\ + pkg.origin + '\t'\ + pkg.suite Notes: Contrary as what is said in comments apt-show-versions is still maintained, check the official mailing list. But it can't help because it doesn't output the package's origin.
Find source of all installed packages on Debian based systems
1,421,928,404,000
I'm creating a Debian package that has a few dependencies not found in the official repositories. Simply specifying these other packages as dependencies doesn't cut it, as their installations alone involve running apt-get update and adding source repositories (which aren't mine) to /etc/apt/sources.list.d. More: one of these packages is Dart language SDK - which you can only install by grabbing their deb and using dpkg, or by adding one of Google's repos. My goal is really just finding a balance between minimizing the number of steps involved in my package's installation and clean package deployment. So I'd like for my package's pre-installation script to add these sources and then run apt-get update, but the main problem is that when the package is open and being installed it puts a lock on dpkg. So is it possible to achieve what I'm after directly, or what other options/workarounds are there?
I don't think its possible directly. But somehow the user got your package to install—and apparently not from your repository, since it hasn't been added yet. So the first workaround I'd suggest would be to do things the normal way: have the user add the repository (or give the user a simple shell script), then install your package as normal. This would be my preferred solution, and running a shell script is no harder than installing a package. Second workaround: have your package just be a setup package. Have it set up your repository, then tell the user (e.g., via debconf note or other prompt on screen) to install the real package (which will come from your repository). Third workaround: Same setup package, but use the same package name in your repository, just a higher version (use an epoch, probably). So the initial install will set up the repository, then apt upgrade or similar will pull in the real package. Fourth: I'm not sure this is a good idea, but—In your postinst, fire off a background process that will wait for the dpkg lock, then finish your install. I think at or batch will work for this, or just an ordinary /path/to/script & followed by disown. You probably want to let the user know that the package install will finish in the background. PS: you probably need to add a GPG key as well.
Is it possible to have a Debian package pre-install script run apt-get commands?
1,421,928,404,000
In rpm-based systems, we can easily see if there is a signature associated with an rpm file: rpm -qpi <rpm-file.rpm> | grep -i signature For .deb files, we can see the package information but it doesn't include the information of whether a signature is associated or not: dpkg-deb -I uma-18feb-latest.deb Is there a way in Ubuntu to see the signature without using the following command which actually verifies the signature? dpkg-sig --verify <deb-file.deb>
dpkg-sig --list <deb-file.deb> will list any items in the file which look like a signature, without verifying the file. This will list the role of any signature in the file; e.g. $ dpkg-sig -l vuescan_9.7.50-1_amd64.deb Processing vuescan_9.7.50-1_amd64.deb... builder $ dpkg-sig -l zstd_1.4.8+dfsg-2.1_i386.deb Processing zstd_1.4.8+dfsg-2.1_i386.deb... $ The first file has a signature with the “builder” role; the second file isn’t signed. Note that it’s unusual for individual .deb files to be signed (unlike RPMs). Debian packages’ authenticity relies on the repository’s authenticity; see How is the authenticity of Debian packages guaranteed?
How can I check if there is a signature associated with a deb package?
1,421,928,404,000
With dpkg -l I can see all installed packages on debian. But I have installed some packages from jessie and some from stretch. How do I find out, which packages are installed from stretch?
apt-show-versions, from the eponymous package, will tell you what release your installed packages are from. apt list --installed will also tell you this, without needing to install a new package.
list all packages from which distribution
1,421,928,404,000
Is there an analog for dpkg -S <file>, but for configuration files, such as /etc/samba/smb.conf? Which are generated on dpkg-reconfigure, I guess. user@host:~$ dpkg -S /etc/samba/smb.conf dpkg-query: no path found matching pattern /etc/samba/smb.conf
dpkg -S will only find configuration files which are shipped directly in packages, not those which are generated by maintainer scripts (or other tools). There’s no general solution for the latter, but looking for references to the file in /var/lib/dpkg/info is your best bet. In this instance: $ grep -rl /etc/samba/smb.conf /var/lib/dpkg/info /var/lib/dpkg/info/samba-common.config /var/lib/dpkg/info/samba-common.postinst /var/lib/dpkg/info/samba-common.postrm /var/lib/dpkg/info/samba-common.templates This suggests that the file is managed by samba-common; reading the postinst file will confirm that.
Which package provides a certain configuration file?
1,421,928,404,000
Possible Duplicate: How to find out which (not installed) package a file belongs to? The wish is to install hd-idle on a bare Debian 6.0.6 installation. For installation the hd-idle documentation instructs: Run "dpkg-buildpackage -rfakeroot" However trying to run that command results in: root@debian:/tmp/hd-idle# dpkg-buildpackage -rfakeroot -bash: dpkg-buildpackage: command not found How to fix this missing dpkg-buildpackage?
Go to http://packages.debian.org/, go to the bottom of the page (titled Search the contents of packages), select your version of Debian, enter dpkg-buildpackage as the keyword and click search. That will tell you which package to install to get the dpkg-buildpackage command.
How to fix dpkg-buildpackage: command not found? [duplicate]
1,421,928,404,000
I tried to install jdk/jre: ben@ubuntu:~$ sudo apt-get install openjdk-7-jre-headless However, I got this message: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? I cannot get git to install either, so I don't think it is a problem with the specific package I selected. What that error means, and how to deal with it?
Do you have the GUI package manager/or update manager programs running? If so there's a conflict, simply close those programs down and your command line should work.
I cannot install new packages: "Could not get lock /var/lib/dpkg/lock"
1,421,928,404,000
I'm kinda curious. And if it is possible, then how?
Yes, dpkg is an AUR package for a long time. Yet, it is not meant to install .deb packages. Instead it is meant to build .deb packages on Arch (i.e. packages that then can be installed on Debian, Mint, Ubuntu, etc). On the other hand, installing a .deb package on Arch is not hard. Let's take slack (a chat program that has a .deb package) as an example. In the PKGBUID of this AUR package you can see a simple script that performs the installation: bsdtar -O -xf "slack-desktop-${pkgver}"*.deb data.tar.xz | bsdtar -C "$pkgdir" -xJf - # Permission fix find "${pkgdir}" -type d -exec chmod 755 {} + # Remove all unnecessary stuff rm -rf "${pkgdir}/etc" rm -rf "${pkgdir}/usr/share/lintian" rm -rf "${pkgdir}/usr/share/doc" # Move license install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} mv ${pkgdir}/usr/lib/slack/LICENSE ${pkgdir}/usr/share/licenses/${pkgname} ln -s /usr/share/licenses/${pkgname}/LICENSE ${pkgdir}/usr/lib/slack/LICENSE And yes, that is the best way to install .deb packages on Arch: converting them to AUR packages. References: Create packages for other distributions
Can dpkg or apt be installed on Arch Linux?
1,421,928,404,000
I would like to build Debian package from source, using dpkg-buildpackage. I have downloaded package source: apt-get -t wheezy-backports source gnucash Inside the file gnucash-2.6.9/configure I see, that there are options which can be selected/deselected when building the package. Debian maintainer has already made the decision for me. But if I want disable some options, how should I do it? Lets say, I want to compile the package without --enable-aqbanking. This option appears in several configuration files: $ grep -rl enable-aqbanking gnucash-2.6.9/ gnucash-2.6.9/packaging/gnucash.spec gnucash-2.6.9/packaging/gnucash.spec.in gnucash-2.6.9/configure.ac gnucash-2.6.9/configure Which of those should I edit? What is the proper way to do it?
OK, take a look at gnucash-2.6.x/debian/rules. Find the line that says override_dh_auto_configure: (line 23 in my case), and add your overrides below it. In your case --enable-aqbanking is already there (for wheezy-backports at least), so simply delete it. More info can be found in the man page. Update: In addition, sometimes there's a variable in the rules file responsible for passing custom stuff to configure. It's usually at the top of the file and is called DEB_CONFIGURE_EXTRA_FLAGS.
building Debian package with non-standard options
1,421,928,404,000
(trimmed) dpkg -l output on a recent debian bullseye (v11.3) machine: SE Name Version Arch Description ii bind9-host 1:9.16.27-1~deb11u1 amd64 DNS Lookup Utility ii bind9-libs:amd64 1:9.16.27-1~deb11u1 amd64 Shared Libraries used by BIND 9 ^^^^^ Question: why does the name field for the bind9-libs package show the architecture/abi whereas the name field for the bind9-host does not show the architecture/abi? FWIW: $ dpkg --print-architecture amd64 $ grep -A6 "Package: bind9-host" /var/lib/dpkg/status Package: bind9-host Status: install ok installed Priority: standard Section: net Installed-Size: 376 Maintainer: Debian DNS Team <[email protected]> Architecture: amd64 $ grep -A6 "Package: bind9-libs" /var/lib/dpkg/status Package: bind9-libs Status: install ok installed Priority: standard Section: libs Installed-Size: 3734 Maintainer: Debian DNS Team <[email protected]> Architecture: amd64
Adding one more line would reveal the relevant field: $ grep -A7 "Package: bind9-libs" /var/lib/dpkg/status Package: bind9-libs Status: install ok installed Priority: standard Section: libs Installed-Size: 3734 Maintainer: Debian DNS Team <[email protected]> Architecture: amd64 Multi-Arch: same bind9-libs is marked “Multi-Arch: same”, which means it can be co-installed for multiple architectures (e.g. amd64 and i386). For packages with this property, dpkg shows the architecture along with the package name. bind9-hosts isn’t marked as such, therefore it isn’t co-installable and can only ever be present for one architecture.
Debian: "dpkg -l" name field sometimes includes arch/abi, sometimes not. Why?
1,421,928,404,000
I am trying to run the command dpkg --configure -a in order to fix dpkg so I can apt-get programs. I get the error addgroup: The group 'systemd-journal' already exists as a system group. Exiting. This apparently corresponds to the following bug. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1475094 Is there a way to overcome this problem for now to get my system working until the bug gets fixed? The system is Ubuntu 16.04 server 32 bit.
If the group is empty, you could just remove it and then run your dpkg command. Since the command itself, apparently, creates the group, after running it everything should be fine. So, first: sudo delgroup --only-if-empty systemd-journal And then sudo dpkg --configure -a Once that has run, make sure the group was recreated and, if not, create it again.
Warning because addgroup tries to create an already existing user group
1,421,928,404,000
I noticed a weird antipattern in some CI scripts I've taken over, which basically boils down to this code checking whether a particular file is present in a package: dpkg --contents some.deb > contents.txt grep --quiet foo contents.txt I tried the obvious refactor of dpkg --contents some.deb | grep --quiet foo, but I keep getting this error: dpkg-deb: error: tar subprocess was killed by signal (Broken pipe) From some more investigation, this is definitely a timing issue. If I use a regex which matches early in the input stream I get the error, but if I use a regex which specifically matches a late line it succeeds. The most obvious conclusion is that dpkg (or possibly tar) does something wrong with SIGPIPE. Is this a known issue? Platform: # lsb_release --all No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic # dpkg --version Debian 'dpkg' package management program version 1.19.0.5 (amd64). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. # tar --version tar (GNU tar) 1.29 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason.
dpkg uses tar to list the package contents. When tar can’t process an archive in full, it indicates an error, and that’s what dpkg is reporting. Both commands expect that an inability to complete their task is an error, and act accordingly. You can avoid this by ensuring that grep reads all its input before exiting: | grep foo > /dev/null (instead of -q, which exits as soon as it matches).
Is `dpkg --contents` unable to handle SIGPIPE?
1,421,928,404,000
On (Ubuntu) Debian how do I use dpkg -i to install packages on a computer with no internet. I have all the packages and dependencies together all in one folder. I don't need the internet to download anything. For example, If chrome and all of it's dependencies are together in one folder the command dpkg -i *.deb wants to install chrome BEFORE the dependencies and spits out dependency errors even though the files are right there with chrome in the same directory. In order to get it to work I have to move all the dependencies out of the folder and into a separate folder in order to run dpkg -i *.deb on the dependencies first then afterward go back into the folder with chrome and run the same command again for the chrome package. In past versions of Ubuntu all I would have to do is use the following command on all of files in the same directory: dpkg -i --force-all *.deb and it would install the package and all of it's dependencies if they were there together in the same folder. If I have a folder with a package and it's dependencies together in a single folder how do I install the package without using apt-get to connect to the internet?
I am writing Ubuntu specific answer, it should work on Debian as well(never used Debian). So if you have a .deb file with all it's dependencies, First move these dependencies to /var/cache/apt/archives/ directory. Now execute sudo dpkg -i <your_deb_file>. After this command your .deb file will be half installed(unconfigured) and it will show error about unsatisfied dependency . Now execute sudo apt-get install -f. It will pick all the dependencies form /var/cache/apt/archives/ and will install them and will configure the previously unconfigured package. You can refer this answer for better understanding.
How to use dpkg -i to install package and dependencies where dependencies are all in the same folder
1,421,928,404,000
There are two suggested configuration options to install post-install hooks into Debian's apt/dpkg system: DPkg::post-invoke(1) and DPkg::post-invoke-success(2). For me, only post-invoke seems to work and I could not find any documentation about post-invoke-success. Can someone enlighten me about differences, if they exist, and maybe which alternative should be used?
There are three different hooks called Post-Invoke or Post-Invoke-Success, all managed by the apt tools: DPkg::Post-Invoke, which is invoked after every execution of dpkg (by an apt tool, not manually); APT::Update::Post-Invoke-Success, which is invoked after successful updates (i.e. package information updates, not upgrades); APT::Update::Post-Invoke, which is invoked after updates, successful or otherwise (after the previous hook in the former case). These are handled respectively in apt-pkg/deb/dpkgpm.cc, line 1509 and apt-pkg/update.cc, lines 111 and 114. There is no DPkg::Post-Invoke-Success hook that I can find. If you want to add a hook to all dpkg invocations, you should look at the post-invoke hook in /etc/dpkg/dpkg.cfg, which is equivalent to DPkg::Post-Invoke above but is applied in all cases, not just apt-based executions of dpkg. To see examples of all the apt configuration options, look at /usr/share/doc/apt/examples/configure-index.gz.
What's the difference between DPkg::post-invoke and DPkg::post-invoke-success?
1,421,928,404,000
I'm working under Raspbian (for RaspberryPi): Linux version 3.18.14-v7+ (root@vagrant-ubuntu-trusty-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) nb : I'm connecting to the pi from my laptop using a ssh session. When trying to solve this problem here: How to fix perl : warning : setting local failed I run sudo dpkg-reconfigure locales perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US.UTF-8", LC_ALL = "en_US.UTF-8", LC_PAPER = "fr_FR.UTF-8", LC_ADDRESS = "fr_FR.UTF-8", LC_MONETARY = "fr_FR.UTF-8", LC_NUMERIC = "fr_FR.UTF-8", LC_TELEPHONE = "fr_FR.UTF-8", LC_IDENTIFICATION = "fr_FR.UTF-8", LC_MEASUREMENT = "fr_FR.UTF-8", LC_TIME = "fr_FR.UTF-8", LC_NAME = "fr_FR.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory dpkg-query: package 'locales' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. /usr/sbin/dpkg-reconfigure: locales is not installed locales is not installed so I run this command to install locales sudo apt-get install locales 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: apache2-mpm-prefork : Depends: apache2.2-bin (= 2.2.22-13+deb7u5) but it is not going to be installed apache2.2-common : Depends: apache2.2-bin (= 2.2.22-13+deb7u5) but it is not going to be installed Depends: apache2-utils but it is not going to be installed Depends: procps but it is not going to be installed Depends: perl but it is not going to be installed Recommends: ssl-cert but it is not going to be installed libbz2-1.0 : PreDepends: multiarch-support but it is not going to be installed libc6 : Breaks: locales (< 2.19) libcomerr2 : PreDepends: multiarch-support but it is not going to be installed libdb5.1 : PreDepends: multiarch-support but it is not going to be installed libgcc1 : PreDepends: multiarch-support but it is not going to be installed libgssapi-krb5-2 : Depends: libkeyutils1 (>= 1.4) but it is not going to be installed Depends: libkrb5support0 (>= 1.12~alpha1+dfsg) but it is not going to be installed PreDepends: multiarch-support but it is not going to be installed libk5crypto3 : Depends: libkeyutils1 (>= 1.4) but it is not going to be installed Depends: libkrb5support0 (>= 1.12~alpha1+dfsg) but it is not going to be installed PreDepends: multiarch-support but it is not going to be installed libkrb5-3 : Depends: libkeyutils1 (>= 1.5.9) but it is not going to be installed Depends: libkrb5support0 (= 1.12.1+dfsg-19) but it is not going to be installed PreDepends: multiarch-support but it is not going to be installed libmagic1 : PreDepends: multiarch-support but it is not going to be installed libpcre3 : PreDepends: multiarch-support but it is not going to be installed libssl1.0.0 : Depends: debconf (>= 0.5) but it is not going to be installed or debconf-2.0 PreDepends: multiarch-support but it is not going to be installed libxml2 : Depends: liblzma5 (>= 5.1.1alpha+20120614) but it is not going to be installed PreDepends: multiarch-support but it is not going to be installed Recommends: xml-core but it is not going to be installed locales : Depends: glibc-2.13-1 Depends: debconf (>= 0.5) but it is not going to be installed or debconf-2.0 php5-common : Depends: sed (>= 4.1.1-1) but it is not going to be installed Depends: psmisc (>= 22.15-1~) but it is not going to be installed Depends: lsof but it is not going to be installed PreDepends: dpkg (>= 1.16.1~) but it is not going to be installed tzdata : Depends: debconf (>= 0.5) but it is not going to be installed or debconf-2.0 ucf : Depends: debconf (>= 1.5.19) but it is not going to be installed Depends: coreutils (>= 5.91) but it is not going to be installed zlib1g : PreDepends: multiarch-support but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Any hints?
This is the complete solution for my problem install locales sudo vim /etc/apt/sources.list - deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi deb http://apt.adafruit.com/raspbian/ wheezy main change wheezy to jessie run sudo apt-get update && sudo apt-get install locales revert back to wheezy (change jessie to wheezy ) sudo apt-get update sudo dpkg-reconfigure locales Now if i run perl i get the following warnings perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = "fr_FR.UTF-8", LC_ADDRESS = "fr_FR.UTF-8", LC_MONETARY = "fr_FR.UTF-8", LC_NUMERIC = "fr_FR.UTF-8", LC_TELEPHONE = "fr_FR.UTF-8", LC_IDENTIFICATION = "fr_FR.UTF-8", LC_MEASUREMENT = "fr_FR.UTF-8", LC_TIME = "fr_FR.UTF-8", LC_NAME = "fr_FR.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Generating fr_FR.UTF-8 , and en_US.UTF-8 sudo nano /etc/locale.gen uncomment those lines : en_US.UTF-8 fr_FR.UTF-8 and finally running sudo locale-gen
Can't install locales [closed]
1,421,928,404,000
I'm trying to upgrade some package in a VM, but I dpkg refuses to apply the upgrades due the following: dpkg: error processing /var/cache/apt/archives/ifupdown_0.7.5ubuntu2.2_amd64.deb (--unpack): unable to make backup link of `./sbin/ifquery' before installing new version: No such file or directory Preparing to replace unzip 6.0-8ubuntu1 (using .../unzip_6.0-8ubuntu2_amd64.deb) ... Unpacking replacement unzip ... dpkg: error processing /var/cache/apt/archives/unzip_6.0-8ubuntu2_amd64.deb (--unpack): unable to make backup link of `./usr/bin/unzip' before installing new version: No such file or directory dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) What it means? The permissions are fine and the file definitively exist: ls -l /sbin/ifquery -rwxr-xr-x 1 1500000 1500000 58496 dic 12 2012 /sbin/ifquery
This means that for some motive, you can't move the binary in the file system: sudo mv /sbin/ifquery{,.bk} [sudo] password for braiam: mv: cannot move ‘/sbin/ifquery’ to ‘/sbin/ifquery.bk’: Input/output error You should check the filesystem for problems or ask your system administrator.
What means "unable to make backup link of /binary before installing new version: No such file or directory"?
1,421,928,404,000
On one of my machines dpkg is unable to finish installing/configuring grub, only giving the error message: subprocess installed post-installation script returned error exit status 255 Full output: # dpkg --configure grub-pc Setting up grub-pc (1.99-27+deb7u3) ... device node not found device node not found device node not found device node not found Installation finished. No error reported. Installation finished. No error reported. dpkg: error processing grub-pc (--configure): subprocess installed post-installation script returned error exit status 255 Errors were encountered while processing: grub-pc There is nothing in the log files that would shed any more light. Running dpkg with some debug options reveals a little more: # dpkg -D10113 --configure grub-pc Setting up grub-pc (1.99-27+deb7u3) ... D000002: fork/exec /var/lib/dpkg/info/grub-pc.postinst ( configure ) device node not found device node not found device node not found device node not found Installation finished. No error reported. Installation finished. No error reported. dpkg: error processing grub-pc (--configure): subprocess installed post-installation script returned error exit status 255 D010000: trigproc_run_deferred Errors were encountered while processing: grub-pc Now I know the problem is someplace in /var/lib/dpkg/info/grub-pc.postinst configure, but that script doesn't seem to have any verbosity or debug options and is just to large to read through with nearly 700 lines. The script also doesn't have any exit 255 calls, so I tend to believe the problem isn't even in there but in some other script that is called. The configure task also fails for the kernel processes: # dpkg --configure linux-image-3.16.0-0.bpo.4-amd64 Setting up linux-image-3.16.0-0.bpo.4-amd64 (3.16.39-1+deb8u1~bpo70+1) ... vmlinuz(/boot/vmlinuz-3.16.0-0.bpo.4-amd64 ) points to /boot/vmlinuz-3.16.0-0.bpo.4-amd64 (/boot/vmlinuz-3.16.0-0.bpo.4-amd64) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-0.bpo.4-amd64.postinst line 263. initrd.img(/boot/initrd.img-3.16.0-0.bpo.4-amd64 ) points to /boot/initrd.img-3.16.0-0.bpo.4-amd64 (/boot/initrd.img-3.16.0-0.bpo.4-amd64) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-0.bpo.4-amd64.postinst line 263. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-3.16.0-0.bpo.4-amd64 run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 255 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-0.bpo.4-amd64.postinst line 634. dpkg: error processing linux-image-3.16.0-0.bpo.4-amd64 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: linux-image-3.16.0-0.bpo.4-amd64 Line 634 in /var/lib/dpkg/info/linux-image-3.16.0-0.bpo.4-amd64.postinst boils down to this command: run-parts --report --exit-on-error --arg=3.16.0-0.bpo.4-amd64 --arg=/boot/vmlinuz-3.16.0-0.bpo.4-amd64 /etc/kernel/postinst.d Running this command manually results in: run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 255 This script is, as far as I can tell, only a wrapper that does a check and then calls update-grub, which works without error. update-grub just runs grub-mkconfig, so I ran this command and checked the return value: # grub-mkconfig -o /boot/grub/grub.cfg Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.16.0-0.bpo.4-amd64 Found initrd image: /boot/initrd.img-3.16.0-0.bpo.4-amd64 Found linux image: /boot/vmlinuz-3.2.0-4-amd64 Found initrd image: /boot/initrd.img-3.2.0-4-amd64 # echo $? 255 This seems to be the culprit. The script works, finds all kernels, generates a valid grub config (saves it as /boot/grub/grub.cfg.new though) and then exits with return code 255. And of course it doesn't have any debug options. How can I go on debugging the problem? Additional information that might or might not be helpful: the system is running debian wheezy GRUB is version 1.99-27+deb7u3 the system has an mdraid the system has been running for years, it's not a new installation. The error appeared only recently not quite sure, but I believe the error started to appear after a faulty hard drive was replaced the configure task only fails for grub and the kernel packages. All other packages can be installed without error More information from questions that came up later zulu668:~# cat /proc/mdstat Personalities : [raid1] md2 : active raid1 sda4[2] sdb4[1] 1456504640 blocks super 1.2 [2/2] [UU] md1 : active raid1 sda3[2] sdb3[1] 7996352 blocks super 1.2 [2/2] [UU] md0 : active raid1 sda2[2] sdb2[1] 499392 blocks super 1.2 [2/2] [UU] unused devices: <none> zulu668:~# sudo mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : Wed Oct 29 12:40:33 2014 Raid Level : raid1 Array Size : 499392 (487.77 MiB 511.38 MB) Used Dev Size : 499392 (487.77 MiB 511.38 MB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Wed Mar 15 14:51:01 2017 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : zulu668:0 (local to host zulu668) UUID : 22e14818:7754cf01:67287402:c31a3328 Events : 217 Number Major Minor RaidDevice State 2 8 2 0 active sync /dev/sda2 1 8 18 1 active sync /dev/sdb2
So, at the time of writing, you brilliantly narrowed down your problem to grub-mkconfig and wonder how to debug it. grub-mkconfig is a shell script that basically build your grub.cfg configuration file by executing every script in /etc/grub.d. There is a set -e command at the beginning of grub-mkconfig, meaning "stop at the first non-managed error you encounter". Chances are your problem is due to the failure of one of the grub.d scripts. First, let's identify the culprit. Run: dash -vx grub-mkconfig -o /boot/grub/grub.cfg dash, the Bourne Shell interpreter that is most likely bound to /bin/sh, will output every line it executes. Since the script probably fails due to the set -e command, the last line is likely to be the grub.d sub-script that fails. I assume you will get something like: + echo ### BEGIN /etc/grub.d/99_buggy_script ### + /etc/grub.d/99_buggy_script The script name itself won't probably give you enough evidence on what is going on. Since it's also a Bourne shell script, you can debug it the same way. Change the first line of the grub.d script from #!/bin/sh To: #!/bin/sh -vx And run grub-mkconfig -o /boot/grub/grub.cfg (dash -vx is no longer necessary). The trace you will get is from the grub.d script. Hopefully, the problem will be obvious now. Once you have fixed it, don't forget to remove the -vx flags at the beginning of the grub.d sub-script.
Debugging dpkg configure failure with grub
1,399,366,660,000
I'd like to output a list of all, currently not installed, packages (they are visible in Synaptic for example) using only shell commands. How do I do this?
aptitude search '!~i' See the Search Term Reference in the aptitude user's manual for details.
How to list currently not installed packages?