date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,321,929,332,000 |
For several days I have left this command running in a terminal emulator
ltrace -p `pgrep xfwm4`
while using the system normally, and I'm yet to see any output from ltrace. Note: xfwm4 is Xfce's window manager.
Is this expected? A busy window manager does not make any library calls?
I am experiencing an unpredictabl... |
because the parent process is not making any library calls...
like strace, there is a flag to follow child process.
check the man page;
-f Trace child processes as they are created by currently traced processes as a result of the fork(2) or clone(2) system calls. The new process is attached immediately.
| why does ltrace produce no output |
1,321,929,332,000 |
I have an iMac mid 2011 running OSX and I am trying to install Arch Linux following this guide. I successfully set up a dual boot last year following a similar procedure but now I can't even start since I get a kernel panic while booting from the live usb installation of archiso: right before the login prompt. I'm 100... |
I installed the linux-lts package as suggested by @mikeserv from chroot and I set it as the default boot option from the grub configuration.
This way I could boot nicely into linux 3.14 and complete the installation process. The vanilla linux kernel is installed alongside with the LTS version so using the "advanced op... | How to debug a kernel panic on boot with archiso? |
1,321,929,332,000 |
I'm trying to debug the kernel. But I couldn't trigger kgdb with echo g > /proc/sysrq-trigger, it just prints help message.
I have enabled kernel debugging, kgdb over serial, frame pointer etc.
CONFIG_DEBUG_KERNEL=y
CONFIG_FRAME_POINTER=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
What could... |
Looks like setting kgdboc parameters in boot options worked, not sure why.
(I'm using libvirtd)
| sysrq-trigger doesn't accept parameter 'g' |
1,321,929,332,000 |
On my system (Debian Lenny AMD64), gnome-panel seems to act up now and again. I've not found a way to force it to happen, but it seems to be related to launching processes. Basically, I launch some process, and I see 1 core max itself out, and the taskbar freezes. I pkill gnome-panel, the taskbar reappears, and everyt... |
You could try taking a look at the ~/.xsession-errors file. If you're lucky you might find some failed assertion or error in there.
You could also install the gnome-panel-dbg package and attach gdb to the running panel to get a backtrace in case of crash (more information here).
| How can I figure out why gnome-panel is frequently misbehaving? |
1,321,929,332,000 |
I'm trying to run lldb on Alpine Linux V3.8, but when trying to debug any program, it hangs.
I'm using lldb 5.0.1-r0 from the edge/testing repository, which is the only version available currently in the Alpine repos:
lldb policy:
5.0.1-r0:
lib/apk/db/installed
http://dl-cdn.alpinelinux.org/alpine/edge/testi... |
I was able to build a functional lldb from latest sources, 8.0.0 trunk, by following the official build instructions on https://lldb.llvm.org/build.html, with the following CMake parameters:
cmake ../llvm -GNinja -DCMAKE_BUILD_TYPE=Release
Build takes a while, but produced a good lldb build which didn't hang and seem... | lldb hangs on Alpine Linux |
1,321,929,332,000 |
I noticed that kernel has different console levels for the printk.
I also noticed this post [1].
I understand that we can change the /proc/sys/kernel/printk to change the printk level for the console; We can even use the dmesg --level to change the display level for dmesg.
However, my question is:
If I have a printk(... |
It looks to me like KERN_DEBUG and lower will not get compiled in unless you set an appropriate flag in your kconfig. http://lxr.free-electrons.com/source/include/linux/printk.h?v=4.10#L280 I highly doubt the overhead of a function call and checking an if statement is an issue though and that is all the printk(KERN_DE... | How to let kernel not run the printk with KERN_DEBUG |
1,321,929,332,000 |
I'm debugging a networking project, which involves interacting of 3 programs, ie a server, two different clients. However I find it difficult to start and stop them for debugging. Some methods I have tried so far:
Start 3 terminals. Run ./server, ./client1, ./client2. The problem with this method is I need to switch ... |
Make something like this your launch script:
./server & server_pid=$!
./client1 & client1_pid=$!
./client2 & client2_pid=$!
echo 'kill "$@"' "$server_pid $client1_pid $client2_pid" >.kill.sh
And call ./kill.sh to kill all the processes. The key point is to use $! to retrieve the PID of the last backgrounded command, ... | Start and stop multiple executable for easy debugging |
1,509,354,732,000 |
I realise this is probably a bad question but I'm stuck. After a lot of googling I'm struggling to fix the problem. I've been trying to get AppArmor to work on Debian. I've been following the instructions from https://wiki.debian.org/AppArmor/HowToUse.
Part of the instruction told me to do
sudo perl -pi -e 's,GRUB_CM... |
I have managed to solve the issue. The way I did this was by editing /etc/default/grub and changing GRUB_CMDLINE_LINUX from
GRUB_CMDLINE_LINUX=" apparmor=1 security=apparmor"
to
GRUB_CMDLINE_LINUX=""
Then after running sudo update grub and sudo reboot the issue was fixed. However this stopped apparmor from working a... | AppArmor is causing Firefox segfaults |
1,509,354,732,000 |
This is the macro I have so far:
define(`debug_macro', `
#ifndef $1_DEBUG
#define $1_DEBUG'forloop(`i',`1',eval(5-(len($1)/4+ifelse(eval(len($1)%4 == 0)), `0', `1')),` ')dnl`0
#endif
')
The goal is to put the correct number of tabs between the _DEBUG and the 0 character so they all line up. There may be missing pa... |
The simplest way to indent something is to use spaces, not tabs. Especially not tabs with a non-standard width (insofar as there is a standard width for tabs, it's 8).
The second-simplest way to indent something with tabs is to generate a file with spaces and call unexpand to replace spaces by tabs.
That being said, y... | m4 macro using variable number of tabs to line up a column |
1,509,354,732,000 |
When I do a tar command, like :
tar -xzvf xxxxxxxx
tar -zcvf xxxxxxxx
does the -v parameter reduce the performance of the operation or is this negligible ?
I find it usefull to track progress on heavy operations, but I would like to know if it is ok to keep it.
|
In most cases xxxxxxxx the performance the performance impact will be negligable, as you are only writing a few bytes to stdout for (unless you have tiny files) many more bytes read from the tar to store in files or vv. If you compress during creation, as in your second example, that will reduces the amount of bytes w... | Does verbose parameter of tar reduce performances? |
1,509,354,732,000 |
I have a script in /etc/init.d that I'm trying to add echo statements to...but all of my changes seem to be ignored.
I'm guessing because the script itself is not actually run but that systemd is doing something behind the scenes to continue running the old version of the script. Is there a way to "load" these chan... |
No, there's not a way for systemd to load the changes you made to files in /etc/init.d because systemd is largely ignoring the files anyway. See the gory details at How does systemd use /etc/init.d scripts?.
Consider asking a different question about the specific problem you are attempting to solve by editing /etc/ini... | How can I modify an init script on CentOS 7? |
1,509,354,732,000 |
in this bash script.. it simply shows..
+cat
as it runs.
#!/bin/bash
set -x
cat > /test << "EOF"
a
b
c
d
EOF
but i rather show everything that it does . including the
a
b
c
d
that it adds to a file.
|
Try using set -v instead of the set -x
| Bash script in ( set -x ) mode does not display what "cat" command does. ( contents of it ) |
1,509,354,732,000 |
I've just found out that in a simple UDP client/server application I wrote on Linux userspace, the UDP client (1 Gbit Ethernet interface) sends the data with 1 Gbit speed to a UDP server which has only a 100 Mbit Ethernet interface. Of course this leads to massive packet loss on the server side.
I have to adjust the N... |
UDP is a “fire-and-forget” transport, so it doesn’t care what happens to packets once they’re sent. This means you can send at the egress rate of the source system, regardless of the characteristics of the path to the destination; obviously this leads to packet loss if the source interface can send packets faster than... | Why does a UDP client send 1Gbit speed to 100Mbit server? |
1,509,354,732,000 |
I know the time in dmesg is the time since boot. But my specific question is this time is calculated at the start or end of the process mentioned in the line?
Why this is important?
take this example:
[ 4.352025] floppy0: no floppy controllers found
[ 5.718270] random: nonblocking pool is initialized
[ 94.1342... |
Each log entry shows the time at which the log entry was printed. No more, no less. If the log entry describes a process that is not instantaneous, there's no rule that the log entry must come before or after that process is carried out, it's up to what the developer chose to do. Grammar is a clue: “did this” indicate... | Making sense of Time in dmesg |
1,509,354,732,000 |
EDIT:
Thanks to all answerers and commenters, there's enough material to keep me busy for a while !
I recently switch to Linux and wanted to do my first development steps with the following source:
SDL Sopwith
Beside compiling and running the program with the following lines :
./configure
make
I couldn't figure out... |
I usually use vim or gvim, Eclipse, or IntelliJ. Eclipse works surprisingly well for other languages, it's primarily suited to Java but through the use of plugins can be adapted to suite other languages too.
Eclipse CDT (C/C++ Development Tooling)
excerpt
The CDT Project provides a fully functional C and C++ Integr... | How do I know on which IDE to edit a project's source code? |
1,509,354,732,000 |
I have a simple clock program that uses math.h functions. I am currently on Kubuntu 21.10, the GCC version is (Ubuntu 12.2.0-3ubuntu1) 12.2.0, and the GDB version is (Ubuntu 12.1-3ubuntu2) 12.1.
The program source code (although it might not be needed):
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <... |
The info you need is not in the math.h header file, it's in the source code of the C standard library. Unfortunately, as noted in the Service - Debuginfod documentation, the Ubuntu Debuginfod service currently does not provide that:
Currently, the service only provides DWARF information. There are
plans to make it al... | GDB fails to download debuginfo for math.h |
1,509,354,732,000 |
Is there some way to make rsync report why it decided to make a new copy of a file, instead of hard-linking it? (E.g. because of timestamp, or detected a change in content... etc.)
(I'm creating incremental backups but some files which should not have been changed for long time, are still getting copied over instead o... |
Using --itemize-changes (or -i) in place of -v gives slightly more information about the reason something happens to the files that you run rsync on.
For example, if a file has had its group ownership changed but nothing else, you may see something like cf.....g... for that file. The initial character is the "update ... | How to debug rsync's --link-dest option? |
1,509,354,732,000 |
Does some sort of command like:
echotonet "this"
or
cat file.txt > echonet
that could allow one to easily paste text document data to a service like paste.debian.net ?
I often use paste.debian.net in order to retrieve on some machines pieces of scripts too long to be written in shell and edited in a visual environm... |
I mean, for your mentioned paste.debian.net, there's several clients linked to from the website.
The debian repos carry pastebinit, which you can use, it's nice enough. I typically don't care enough to install it; what it does is "small" enough that curl does it well enough;
curl -F file=@myfile https://0x0.st
to upl... | Does an echo to network command exist in debian? |
1,509,354,732,000 |
Given a shell script (bash in this example), one can use the set -x or -x passed to bash or other supporting shells to generate debug output.
I know how to redirect said output to a file ./script.sh 2> out.log or bash -x script.sh 2> out.log.
But how to send stderr to a terminal multiplexer, like screen or tmux?
Mainl... |
Invoke tty in the terminal you want to send something to. It will print e.g. /dev/pts/3 Then redirect anything you want to this file, possibly from another terminal. Like this:
bash -x script.sh 2> /dev/pts/3
This works with tmux, screen, separate terminal emulators or ttys (where you are logged in). Invoke tty in on... | Send debug output to terminal multiplexer |
1,509,354,732,000 |
I am trying to teach myself Linux kernel development by working through Linux Device Drivers, and I'm currently on the chapter about debugging. From everything I've read, printk() messages are supposed to go to "the console", which from what I understand, is usually represented by the device "/dev/console".
The proble... |
xconsole (1) can only get what user-land programs write to /dev/console, but not any kernel messages written to any of the terminals /dev/console is a kind of alias for (2).
The printk kernel messages can only go to
a linux virtual terminal like /dev/tty0 (but not to any pseudo-terminal or terminal emulator) (3). "Vi... | (Linux) Are printk() messages supposed to go to /dev/console? If so, why aren't they appearing? |
1,509,354,732,000 |
Recent versions of glibc ( from 2.12 ? ) have tunable MALLOC_ARENA_MAX and MALLOC_PER_THREAD.
Questions :
Is there any difference between MALLOC_PER_THREAD=0 and MALLOC_ARENA_MAX=1 ?
Is MALLOC_PER_THREAD still supported in the latest glibc ?
Arenas increases virtual memory usage : are suitable for 32 bit kernels ?
Ar... |
As I understand it, MALLOC_PER_THREAD was a temporary configuration knob provided on RHEL to enable the new per-thread allocator (see the corresponding CentOS release notes for details). It is no longer available in current releases of glibc, and the new allocator became the default in 2.15 (I think). Setting MALLOC_... | glibc memory alloction : arenas and debugging |
1,509,354,732,000 |
I noticed that my Debian Jessie system is using many pids, even when the system is (should be) largely idle. The following shows that more or less 270 pids are used per 10s, while the number of active processes stays more or less the same:
$ while :; do echo -n "$(ps | tail -n 1 | cut -d' ' -f1) "; ps aux | wc -l; sle... |
If the load stay low and the process count stay pretty constant, that just means short lived processes are spawn during the ten second period. Twenty seven processes per second might not be a problem at all so there might be nothing to fix.
On the other hand, that might be a bogus daemon or something trying to launch ... | Who is stealing my pids? |
1,509,354,732,000 |
My system crashed and even though I haven't been able to know what caused the crash after going through the usual logs: messages, dmesg, secure, etc. There's nothing valuable I have seen on them so I decided to follow a tutorial in how to run the crash application to see what might have happened.
Every time I run it ... |
The vmlinuz format is compressed AFAIK. The steps are too long to copy-paste here, so I'm gonna provide a link instead.
https://stackoverflow.com/a/30514503/3979290
| After my system crashed and I run crash, but I get the following error: not a supported file format |
1,509,354,732,000 |
On a previous installation of Debian, there was no problem. Double Commander started immediately. The same on Linux Mint on another machine.
But, since I have a new installation of Debian, where the doublecmd starts after ~30 seconds.
Any way to find out why?
I tried to re-install the app, but no change.
lsof -p <pid... |
This looks like a context of cups connecting to localhost and after 30 seconds timing out.
Snip of only important part:
[pid 16247] 15:04:03 open("/home/vlastimil/.cups/client.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16247] 15:04:03 open("/etc/cups/client.conf", O_RDONLY) = -1 ENOENT (No such file... | Double Commander starting after 30 seconds, why? |
1,509,354,732,000 |
How do I delete debug packages that are installed by debuginfo-install?
When I search for them via sudo yum list installed none of the installed packages are listed, even when I enabled the debuginfo repository.
A lot of packages have been installed when reporting bugs via ABRT but I would like to clean them up after ... |
AIUI the latest versions of abrt don't actually install anything, they just use yum to download the packages and it unpacks the data itself.
Update: https://wiki.centos.org/TipsAndTricks/ABRT#head-6ec8c2ca60fa7a4f2e8167a19299ea6d61217df2 suggests that abrt-action-analyze-ccpp-local unpacks them to /var/cache/abrt-di/.... | Uninstalling packages installed by debuginfo-install |
1,509,354,732,000 |
After upgrading Debian Wheezy to Jessie, I experience some random unhiding behaviour of the bottom panel. It does not appear - as before - by moving the mouse into lower right corner. It seems it is showing up, when you move the mouse in the middle of the bottom... but only in 1 out of 15 cases...
How is the right wa... |
Moving mouse to bottom of the screen is usually enough to show bottom panel. Just move the mouse to bottom and a little bit more down ;) I know, sometimes it doesn't work for the first time. Second way is to use keyboard shortcut – windows key (left to the left alt) + m. Panel is not supposed to hide automatically, so... | GNOME 3 - bottom panel is hiding - how to unhide it or change behaviour |
1,509,354,732,000 |
I previously had libgcc1-dbg (and other debug symbol packages) installed on Debian 10 "buster" to get readable stack traces in failure cases or to inspect core files.
It seems, that package does no longer exist. What is the currently preferred method to acquire the debugging symbols under Debian 11 "bullseye", particu... |
-dbg packages have been replaced by -dbgsym packages, which are built consistently and available in a separate repository. For Debian 11, you need to add a file, named /etc/apt/sources.list.d/debug.sources, containing
Types: deb
URIs: http://debug.mirrors.debian.org/debian-debug/
Suites: bullseye-debug
Components: mai... | What's the successor of libgcc1-dbg in Debian 11 and onward |
1,509,354,732,000 |
Netlink (as in, the kernel internal protocol) seems to be very difficult to debug without additional tools - which I can't actually use because I'm on a very confined embedded system.
Is there an in-kernel debugging option for netlink if I recompile from source? e.g. logs confirming messages have been received and und... |
I've resorted to adding my own print logging to the kernel to get visibility on netlink - I can't see any official solution configurable for this.
rtnetlink_rcv_msg in linux/net/core/rtnetlink.c is a good place to start, and you can add printk calls without any extra work, e.g:
printk(KERN_INFO "netlink msg recv msgty... | Is there an in-kernel way to debug netlink protocol communications? |
1,509,354,732,000 |
I am working on a project where I have a infrared multi-touch frame connected to the PC via USB cable, whenever an object, eg, a hand/finger, passes through it, it acts as a mouse.
What I want to do is to be able to print out the coordinates where the object has passed. I was thinking if I can understand how the devic... |
If it already behaves like a mouse you can get the coordinates directly from the mouse events.
There are many ways to do that. For example a python program, with the library python-libinput.
xev will also show you the events.
Or, as root, evtest, that will print a human readable version of what you would read from /de... | Debug character devices (mouse, keyboard, touch screen etc) and read input data |
1,509,354,732,000 |
I need a function to show, only during debug, a message (the function name):
#!/bin/bash
debug_function(){
if [[ $DEBUG -eq 1 ]]; then
echo "${FUNCNAME[1]}"
else
DEBUG=0
fi
}
test_function(){
debug_function
echo "something"
}
foo=$(test_function)
echo "Result: $foo"
It works, but in DEBUG=1 the fu... |
Your echo "${FUNCNAME[1]}" prints to stdout, so its output belongs to the output of the debug_function, which in turn belongs to the output of the test_function.
Print the message to stderr:
by redirecting the output of echo:
echo "${FUNCNAME[1]}" >&2
or by redirecting the entire output of debug_function (if the wh... | Debug messages on function |
1,509,354,732,000 |
I've modified a kernel module (qcaspi) and recompiled it, however my modifications aren't being called (checked dmesg) when the OS boots up.
Instead, the old kernel module is being run.
If I reload the module with rmmod and modprobe then my changes DO get called.
What's going on there? Where is the OS finding the old ... |
Thanks to the comments I was able to find a solution.
update-initramfs -v -u
This updates the archived kernel modules, the -v is for the verbose option.
Takes a few seconds but once done, I can restart my OS and my new driver gets called right away, instead of the older archived version :).
| Custom Kernel module not being loaded |
1,509,354,732,000 |
I saw this error in dmesg:
abrt-hook-ccpp: Failed to create core_backtrace: dwfl_getthread_frames failed: No DWARF information found
Is that a config problem? Do I need to install something to fix this error?
|
As far as I know, DWARF (= Debugging With Attributed Record Formats, see this link for more details) is a type of debugging information embedded into an executable program.
Sometimes, to minimize disk space use and/or to avoid disclosure of the program's internal workings, this debugging information may be stripped aw... | No DWARF information found |
1,509,354,732,000 |
Somehow v gets unset after calling f.
$ zsh -xc 'v=1; f() { local v; v=2 true; }; f; typeset -p v'
+zsh:1> v=1
+zsh:1> f
+f:0> local v
+f:0> v=2 +f:0> true
+zsh:1> typeset -p v
zsh:typeset:1: no such variable: v
Here is the gist of my original reproduction report.
I did email [email protected], but I have yet to rece... |
That was a bug indeed. You did right the right thing to report it.
It was then fixed by this commit: https://sourceforge.net/p/zsh/code/ci/d946f22a4cd2eed0f3a67881cfa57c805703929c/ which will be included in the next version.
And here's the explanation from zsh's maintainer:
On Wed, 2019-08-14 at 10:37 +0100, Stephane... | zsh: Variable gets unset without reason |
1,540,279,357,000 |
It is not clear to me, where the error comes from, the Makefile code follows:
platform_id = $$( uname -s )
platform = $$( \
case $(platform_id) in \
Linux | FreeBSD | OpenBSD | NetBSD ) echo $(platform_id) ;; \
* ) echo Unrecognized ;; \
esac )
and the first target in the Makefile is:
check:
... |
You are using a shell with a broken parser....
Background: parsing $(command) needs a recursive parser to work correctly.
Note that the complete expression $(command) needs to be in a single string and command can be really complex. To find the end of the command, modern shells recursively call the parser and let it s... | debugging a statement in a Makefile on OpenBSD |
1,540,279,357,000 |
I got a crash in corosync which I would like to view in gdb. However, currently the core dump shows me only this much info
Debug logs for core.1385 (Generated on Jul 26 10:17 BST)
[Thread debugging using libthread_db enabled]
Core was generated by `corosync -f'.
Program terminated with signal 6, Aborted.
#0 0x00007f6... |
Normally when you start gdb it displays a message which tells you how to install the required debug symbols.
For example:
# gdb /usr/sbin/corosync
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/g... | How to install debug symbols for corosync package on CentOS? |
1,540,279,357,000 |
how can I improve myself to be like a professional, especially what kind of materials can I read if any?
|
Skill comes with a lot of practice, you should use Linux constantly and with time you will get better. Start by reading man page of any command you use, even if you know the basics of it for example: ls everyone used it, but not many understand what it does and how. Just read and practice also a must book to read is t... | How to improve linux debugging ability and be proficient in using linux [closed] |
1,540,279,357,000 |
./Hello!
My Ubuntu 16.04 LTS installation, probably after installing updates, now unable to start Unity after user login. It just freezes! Google'ing won't help this time :/
I.e. OS boots, show login screen, but Unity hangs during startup and never finished it. I'm even unable to switch to the another console, syste... |
You can not login graphically, but you can still login in text mode. Switch to the console (CtrlAltFn) and log in. Then you can look at the logs.
First, begin with the ~/.xsession-errors file in your home directory. You can also execute ls -ltra ~ | tail to see the last changes in your home. Maybe there are other log ... | How to debug Ubuntu startup process |
1,540,279,357,000 |
I'm trying to debug a linux driver and a particular piece of code is behaving very strangely. In order to see what's going on I've filled the code with printk statements so I can see exactly what the variables I'm interested in do as the code executes. Unfortunately, when printing the ring buffer with dmesg lots of li... |
As far as I can tell, klogd uses a blocking read() to read from /proc/kmsg. It might help if you boost its priority via renice. You could also try writing the kernel logs to a ramfs/tmpfs to save some disk overhead, either via syslog, or with klogd's -f option to write directly to a file.
Otherwise, plan B is ftrace... | How to avoid overflowing the kernel printk ring buffer? |
1,540,279,357,000 |
I am developing an esp32 project and I log all the esp32 uart debug output in multiple files. At some point my early releases crash and the output looks something like this:
Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
Core 0 register dump:
PC : 0x40008150 PS ... |
sed version:
sed -n -E -e '/^Backtrace:/ {s/Backtrace://; s/:0x3ff[^ ]* */ /g; p}' input.txt
This ignores all lines that don't start with "Backtrace:" and uses two search & replace rules to modify matching lines before printing them out.
The s/:0x3ff[^ ]* */ /g operation matches any text beginning with :0x3ff followe... | How to parse a speciffic strings from multiple files with shell script |
1,540,279,357,000 |
I am always getting this error at boot. Is there anything major, and if it is, how could be fixed?
I get that it has something to do with my AMD GPU. Here is the setup I have:
Cpu:
AMD A9-9420 RADEON R5, 5 COMPUTE CORES 2C+3G, 2586 MHz
GPU:
ATI Stoney [Radeon R2/R3/R4/R5 Graphics],
AMD ATI Radeon R5 M230 / R7 M260DX ... |
Edit the file /etc/default/grub and add the below parameters to the GRUB_CMDLINE_LINUX:
$ sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"
Do not forget to run update-grub afterwards.
For me that solved the issue! I had it on an ATI/AMD, a rather old gpu. Also I wanted to mention... | Kernel error: systemd-backlight@backlight:acpi_video0.service |
1,540,279,357,000 |
I tried to record the bug related to my typing but could not get Kazam work as root and as non-root, see following; I installed it by apt-get install kazam ffmpeg successfully but not properly because of the errors/warnings
root@masi:/home/masi# kazam
Traceback (most recent call last):
File "/usr/bin/kazam", line 12... |
The maintainer contacted but no resolution and/or answer.
| Is this missing dependency-bug of Python3 in Kazam of Debian 8.5? |
1,540,279,357,000 |
Many times, there are slight inconsistencies between two similar linux machines, where (for example) tmux supports colours on Machine M1, and does not support colours on Machine M2, or vi adds comments and formatting automatically on M1 but not on M2, or bash prompt has line-warping on or off, ssh options may not matc... |
Based on a comment by @0xC0000022L , I found http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ which seems to be useful, so adding it as a community wiki answer, in case other folks search for such questions ; I would not want them to simply move on, thinking that there was no answer here.
| How to generate a list of configuration files accessed by a tool (eg bash or vi)? |
1,540,279,357,000 |
How to run two X servers together, each with its own layout, directly from command line, without any display manager (e.g. GDB, KDM or LightDM)?
Lets say there are two ServerLayout sections in xorg.conf. One with Identifier "seat0", second with "seat1". Then one can run a specific seat for example with one of these co... |
Solution that worked for my machine with Debian Wheezy is comprised of two steps:
On two tty's create an autologin.
After autologin, automatically start the X with given seat.
I will not post more details because both steps are distro-specific.
Just a few notes:
Autologin can be done for two distinct users but also... | Debugging multiseat: How to run two X server layouts together without display manager? |
1,587,317,360,000 |
Bash 4.3 shell on Linux Mint:
I realize the Bash shell is type-less, or has a very weak form of typing. But can the Bash shell be invoked (e.g. with some option) such that the shell will throw a run time error when a declared integer variable is misused (e.g. by attempting to store a string into that integer variable... |
The way to throw an error is:
set -u
# or
set -o nounset
Then:
$ set -u
$ declare -i age
$ age=hello
bash: hello: unbound variable
However it won't always "work" the way you expect if it's not an unbound variable:
$ hello=world
$ age=hello
bash: world: unbound variable
$ hello=42
$ age=hello
$ echo $age
42
$ hello... | Is there a way for the Bash shell to throw a run time error when an integer variable is misused (by attempting to store a string into that variable)? |
1,587,317,360,000 |
I'm struggling as newbie in logstash, below is some info of my env
Logstash Version: logstash-7.16.2-1.x86_64
java Version: openjdk version "11.0.13" 2021-10-19 LTS
Logstash Conf
input {
stdin { }
}
output {
stdout {
debug => true
}
}
I run logstash with below command, I get error:
# /usr/share/logstash/... |
For debuging you cannot use debug, you would have to use rubydebug as bellow:
output {
stdout {
codec => rubydebug {
metadata => true # This makes the logs to appear in console
}
}
}
| how to enable debug logs in stdout for logstash? |
1,587,317,360,000 |
Segfault but why? It only happens with debian:stretch+mysql.connector+tox and Python3.x. Reproducible from just a few lines:
FROM debian:stretch
RUN apt update -y && apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-ut... |
at first, it looks like a socket issue but socket.gethostbyname(host_name) works.
after some digging, I find that the issue is isolated to " mysql-connector-python"
if you change that to " mysql-connector-python-rf" in your tox.ini the error is gone. that means somewhere in mysql-connector-python it is unable to re... | Segfault with Debian Stretch |
1,587,317,360,000 |
I am trying to make up a .emacs file on my new Fedora 20 computer, and get this line when I use emacs -debug-init &. I expect it to be a trivial mistake, but I find the help on this too detailed and confusing, so can anyone please interpret it for me and say what the error is likely to be?
Debugger entered--Lisp e... |
The meaning of the report is in the first two lines:
Debugger entered--Lisp error: (file-error "Cannot open load file" "browse-kill-ring")
require(browse-kill-ring)
you are trying to load browse-kill-ring and emacs cannot do it.
You need to install this package before you can use it.
| Emacs how do I interpret this Lisp debugger report |
1,587,317,360,000 |
I am trying to debug a shell script executing on a remote server, where I do not have access to the standard output of the script. Can I redirect the output to go over a socket?
|
I was able to achieve this by redirecting output to a fifo, and using the fifo as the input for nc:
#/bin/sh -e
# create a fifo
unlink /tmp/f
mkfifo /tmp/f
# connect to the server in the background
nc localhost 4444 < /tmp/f &
# redirect stdout to the fifo
exec > /tmp/f
# an example that writes to stdout
while tru... | Redirect output of current script to a socket |
1,587,317,360,000 |
I have a script as below:
function dbgtrap {
echo "badvar is $badvar"
}
badvar=0
function some_func {
badvar=1
badvar=2
badvar=3
}
set -o functrace
trap dbgtrap DEBUG
some_func
trap - DEBUG # turn off the DEBUG trap
After I source the script, I got the output:
badvar is 0
badvar is 0
badvar is... |
The trap is invoked after every command line once set. As shown by using the TRACE output below:
+ badvar=0
+ set -o functrace
+ trap dbgtrap DEBUG
++ dbgtrap
++ echo 'badvar is 0'
badvar is 0
+ some_func
++ dbgtrap
++ echo 'badvar is 0'
badvar is 0
++ dbgtrap
++ echo 'badvar is 0'
badvar is 0
+ badvar=1
++ dbgtrap
+... | Question about debug trap |
1,587,317,360,000 |
When using the --adjust-vma option of objdump all the functions get squashed together, as if there is no debug information about where each function starts.
I'll demonstrate with the following simple C file (a.c):
void func(void)
{
}
int main()
{
}
Compile it using gcc -g a.c
Now without the --adjust-vma I get plent... |
The manual for objdump says this about the --adjust-vma option
When dumping information, first add offset to all the section addresses. This is useful if the section addresses do not correspond to the symbol table, which can happen when putting sections at particular addresses when using a format which can not repres... | objdump `--adjust-vma` destroys debug info |
1,587,317,360,000 |
A way to debug X is that I start an X server (X -ac :0), then an xterm (DISPLAY=:0 xterm) and a WM on it (DISPLAY=:0 icewm).
It is unthinkably useful is there is a display problem.
What can I do with wayland? I absolutely do not want a full gnome, I just want a terminal and a VM - and see from the error output, if any... |
Wayland doesn't have a notion of a "clean display server", it's part of your desktop environment.
You could try running mutter directly from your Linux console (Ctrl + Alt + F2) though and then try to launch any graphical terminal emulator, e.g. gnome-terminal:
mutter &
WAYLAND_DISPLAY=wayland-0 gnome-terminal
Or way... | How to start a minimal Wayland session from command line? |
1,587,317,360,000 |
I am using the bpf_printk() helper to print to the kernel debug to trace some BPF programs. The usage is as follows:
#include <stdio.h>
#include <linux/bpf.h>
#include <sys/socket.h>
#include <bpf/bpf_helpers.h>
char LICENSE[] SEC("license") = "GPL";
SEC("sk_msg")
int http_state_machine(struct sk_msg_md *msg) {
... |
trace vs trace_pipe
In general, trace and trace_pipe have the same data. The difference is that trace is static; Events don't get deleted from it, just appended (up until the size of the buffer, which you can show and set in /sys/kernel/debug/tracing/buffer_size_kb). In trace_pipe, however, once you read a certain eve... | How to clear the /sys/kernel/debug/tracing/trace_pipe quickly? |
1,587,317,360,000 |
I'm currently trying to set up remote debugging on a Raspberry Pi using the CodeLLDB plugin for Visual Studio Code and gdbserver. Unfortunately this doesn't seem to work, since every breakpoint I set is greyed out and the tooltip for it reads "Resolved locations: 0".
The version of CodeLLDB is v1.7.0 and the gdbserver... |
I finally got it to work after finding this useful little guide:
https://github.com/vadimcn/vscode-lldb/wiki/Breakpoints-are-not-getting-hit
Using those tips I found out that lldb had located my files not in my workspace, but in some /project/src directory. This meant that all I had to do was add the following to my l... | CodeLLDB for VSCode not working with remote gdbserver |
1,587,317,360,000 |
I have a CentOS 7 machine that is continuously copying data to AWS/S3.
However, it has a problem, which I'd be grateful for suggestions on how to debug.
The copy to S3 would go on for hours/days, and then, the network would stop functioning (I have a cron job that records a ping to the network every minute, as well as... |
but the only way to make the network function again is a reboot
I've had servers like this in the past.
What I did was adding a task into the crontab pinging a known IP address. If it's inaccessible, the network was shut down, the kernel module responsible for the NIC was removed (rmmod module_name) and inserted aga... | How to debug a CentOS weird networking issue |
1,587,317,360,000 |
It seems to me (and correct me if I'm wrong please) that bash is quite bad at error messages that correctly tell you where the problem in your script is. For example, often I will get "bad EOF at line 953". What this really means is that there is a missing fi at line 127. Or, another classic is "-bash: line 60: syntax... |
I found this simple shell breakpoint-debugger in a german shell-scripting book. You add the two following lines where ever you want to start debugging and step through by pressing enter or evaulate variables and functions at runtime.
read var # set simple breakpoint
echo -e "dbg> \c"; read cmd; eval $cmd
run scrip... | bash debug options? |
1,587,317,360,000 |
Is there way how to find out which program is executing my script?
I'm runnig I3 as my window manager and I want to use sxkhd to bynd keys instead of i3config but something keep replacing my sxkhd bynds, so I want to trace what is it.
Maybe I could use strace but I haven't figured out how.
Thanks for answers
EDIT:
tur... |
On Linux you can get a PID of the parent process from $PPID variable or /proc/pid/status. Parent process is not always a calling process in
case of daemons for examples but it usually is. That being said, you
can convert every program into a wrapper that will first log PID of
its parent process to a file and then exec... | How to find which program is executing given program? |
1,587,317,360,000 |
When .bashrc is sourced, my terminal immediately closed - I pinpointed it to ~/.bashrc - what's the best way to debug this? Should echo every line to another file? Is there a log I can look to?
It looks like this line is causing the terminal window to close:
ssh-add ~/.ssh/xyz/oresoftware
that file path doesn't exis... |
I eventually found an answer to this question here:
Any command in my terminal that exits with non-zero code closes my terminal window
What was happening is that set -e; was set before the ssh-add call, and ssh-add was exiting with non-zero code, which then caused my terminal window to close.
So ultimately it was a se... | .bashrc cannot be sourced, how can I debug? [closed] |
1,587,317,360,000 |
Why usbmon have multiple node for single bus in /sys/kernel/debug/usb/usbmon/ folder (like 2s, 2u, 2t) ?
When I trying to sniff usb trafic with my device, it looks like some USB frames are missed. (My application uses U2F-HiD to communicate with device, and some data packets longer than 128 bytes.)
What is a proper wa... |
From Documentation/usb/usbmon.txt in the kernel source:
Two formats are supported currently: the original, or '1t' format, and
the '1u' format. The '1t' format is deprecated in kernel 2.6.21. The '1u'
format adds a few fields, such as ISO frame descriptors, interval, etc.
It produces slightly longer lines, but ... | usbmon have multiple nodes |
1,587,317,360,000 |
Having installed Fedora 21 and found that it works very nicely (unless you want dropbox, hardware acceleration in some things, decent video drivers & codecs etc), I have recently turned to reporting any bugs found by the bug reporter. My problem is, when I first try to report a bug using ABRT, it shows this in the out... |
The server has recently disabled SSLv3 and the client required TLSv2:
https://bugzilla.redhat.com/show_bug.cgi?id=994599
The server supports all TLS versions now.
| "Failed to complete SSL handshake: NSS error -5938." while connecting with the retrace server |
1,587,317,360,000 |
My Linux Mint system (17 Cinnamon, lenovo g565) hangs up frequently during work (say, 2-4 times a day).
It may look different
white screen
black screen
screen freeze
Maybe some of these symtoms look familiar and you know possible reasons to check?
If not, what updates/logs/diagnostic tools can you advice to make the... |
Start from the very beginning. Go to /var/log and have a look at the syslog file.
Almost every error and problem will show up there. Any error entry is a potential problem, it is either the result of another error or the primary cause of your issues.
A healthy system should have VERY few error entries in syslog.
Onc... | frequent linux mint hangs |
1,587,317,360,000 |
A Perl script is stuck,
root 1317478 99.8 0.0 264072 22516 ? R 04:57 478:37 /usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=domain.tld-http -staticlinks -configdir=/usr/local/psa/etc/awstats -output=keywords
but when I strace -f -p, I only get the output
strace: Process 1317478 atta... |
It turned out that the script was waiting on a DNS response that it never received.
| AWStats stuck, but no output on strace: How to debug? |
1,587,317,360,000 |
The manual for pam_systemd_home states that debug messages can be enabled with debug=yes, but they don't state where to put it.
I tried adding the options to the relevant lines in pam.d/system-auth, but it seems to cause a syntax error and disabled sudo: I needed su to allow me to edit the files and revert the changes... |
Simply add debug on the lines where pam_systemd_home is used. As an example :
-session optional pam_systemd_home.so debug
| How to enable debug messages for pam_systemd_home.so? |
1,701,235,839,000 |
I'm getting Permission Denied when attempting to create/touch files in a directory with group ownership permissions.
touch /data/www/acoder.txt
[acoder@box]$ touch /data/www/acoder.txt
touch: cannot touch '/data/www/acoder.txt': Permission denied
cat /etc/group
webdev:x:1001:acoder
id shows I am in group webdev:
[ac... |
This ended up being an fapolicyd denial.
Not sure if this is considered best practice but I fixed this by
Add new rule:
# fapolicyd-cli --file add /data/www/nbsprod/public_html/ --trust-file nbsprod_pub_html
Update rules with fapolicyd-cli
# fapolicyd-cli --update
Verify that fapolicyd is set to run in enforcing mod... | Permission denied for user in group (group has directory write permissions) |
1,701,235,839,000 |
I have such a toy C++ program
#include <iostream>
int main() {
int n{};
std::cin >> n; // waits for input
std::cout << n << std::endl;
}
which pauses upon executing the commented line, waiting for the user input and giving me all the time I want for attaching a debugger to it.
I run this program in a term... |
Two possible solutions (one temporary and one permanent) are outlined in this answer to a similar if not identical question on AskUbuntu.
The section Running a program with temporary capabilities in this ArchLinux wiki gives an alternative solution.
I've tested the temporary solution at the first link and the solution... | Permission error when attaching GDB to PID of running process |
1,701,235,839,000 |
FreePBX 16.0.10.34, or direct Asterisk 11/16/18.6.0 is the same, all of those with some SIP phones got weird audio issues, i.e. voice volume constantly change in one way, metallic voice in the other way ecc.
Audio Codec: G711 or G729
Dial echo test > record pcap
Wireshark > Voip > show call graph and get out of seque... |
check ptime is equal on all devices!
| asterisk debug extension bad quality audio - rtp out of sequence |
1,701,235,839,000 |
I have a program that requires presence of specific device in system (afaik it checks /proc/bus/pci/devices for against list of hardcoded vendor_id:device_id pairs).
How could I fool this software to think that device is present without having it physically connected?
Is there any way to add a line to /proc/bus/pci/de... |
You should run strace on your program to figure out what "presence of specific device" means, exactly.
If it's really just reading that "file" as a normal file: well, easy, then just don't show the right file to that program!
That's what filesystem namespaces are for: isolating a program's view of the filesystem. (it'... | Spoofing /proc/bus/pci/devices |
1,701,235,839,000 |
Trying to run rngd from rng-tools in a chroot environment on Raspberry Pi Zero.
Running ldd with the same chroot shows that all dependencies are satisfied:
pi@raspberrypi:~/rngd_chroot $ sudo chroot /home/pi/rngd_chroot/ ldd /sbin/rngd
libpthread.so.0 => /lib/libpthread.so.0 (0xb6f77000)
libc.so.6 => /... |
TL;DR;
rngd requires /lib/arm-linux-gnueabihf/ld-linux.so.3 (program interpreter) to exist in this exact location when you run the executable, unlike ldd it doesn't resolve it to /lib/ld-linux-armhf.so.3
This great answer about the program interpreter mechanism pointed me in the right direction.
To figure this out I ... | Debugging "chroot: failed to load command '<executable_name>'" besides ldd and /proc/<pid>/maps |
1,701,235,839,000 |
(I asked another question here that led to this question. I'm going to repost some of the command line output that I think is relevant.)
I found an old laptop in my garage (Lenovo IdeaPad U260) and after replacing the motherboard and CPU and installing Ubuntu 18.04.3 LTS, it works almost as good as new. The only probl... |
Following @mosvy 's suggestion, I flashed a windows 2008 server ISO from here using rufus (this is the first time I flashed a non-Linux based OS with it and it worked just as well). In the live USB portion of it, before installing the OS, I could move the cursor and click with my USB mouse, but moving the cursor nor c... | Is there a way to figure out if a touchpad is broken, even if it's unsupported by Linux? |
1,701,235,839,000 |
I'm trying to debug netfilter synproxy module with systemtap.
This is probe point I'm trying to add.
# stap -l 'module("ipt_SYNPROXY").statement("*")' | grep send_client_synack
module("ipt_SYNPROXY").statement("synproxy_send_client_synack@net/ipv4/netfilter/ipt_SYNPROXY.c:72")
And this is how stap script look like
pr... |
I realized it is an issue regarding gcc while compiling kernel. I applied below patch and it fixed.
https://lkml.org/lkml/2015/4/23/605
| Systemtap can not resolve probe point although it is shown in probe list |
1,701,235,839,000 |
lldb-3.9 hangs when I try to open a dump from a dotnet application. The process gets completely stuck, without consuming CPU.
$ gdb -v
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
$ lldb-3.9 -v
lldb version 3.9.1 ( revision )
$ dotnet --version
2.1.403
$ sudo gcore 27247
[New LWP 27248]
[New LWP 27249]
[New LWP... |
I use lldb-4.0
yartat@TATARENKO:/mnt/e/Working/Dumps$ lldb-4.0 $(which dotnet) --core ./player-authentication.dump
(lldb) target create "/usr/bin/dotnet" --core "./player-authentication.dump"
Core file '/mnt/e/Working/Dumps/./player-authentication.dump' (x86_64) was loaded.
(lldb) plugin load /usr/share/dotnet/shared/... | lldb hangs when opening a dump |
1,701,235,839,000 |
Looking to ascertain why when I do something like;
[ ${debug:=0} -gt 0 ] && set -x || set +x
regardless of the conditional set -x is enabled. The issue is that I am unable to use ${debug} to set +x IF debug=1 first.
Test case:
dtest(){ [ "${d:=0}" -gt 0 ] && set -x || set +x; var="abc"; echo "${var}"; }
d=0;dtest
d=... |
You must reset the xtrace in the function.
dtest(){
[ "${d:=0}" -gt 0 ] && set -x
var="abc"
echo "${var}"
set +x
}
d=0;dtest
d=1;dtest
d=0;dtest
Or use a subshell :
dtest(){
[ "${d:=0}" -gt 0 ] && set -x || set +x
var="abc"
echo "${var}"
}
d=0;(dtest)
d=1;(dtest)
d=0;(dtest)
| bash & using a variable to decide when to use 'set'? [closed] |
1,701,235,839,000 |
I have a colleague who is connecting to a remote web host through a php/command line tool that the CMS Drupal uses called drush.
Drush connects to the remote host through ssh, but when we issue commands, we're getting an error when bash tries to parse a certain file. However, it doesn't tell which file has the syntax ... |
It turns out, because of the PATH variable on our windows, we were linking do a different drush from a previous install. This drush was sending the unmatched quote to the remote host, which was sending back the sh errors.
We updated the path (after testing out specifying the full path to drush) and it works now.
| tracking down an sh syntax error |
1,407,811,285,000 |
How can I get, not the dependencies of a package, but the packages that are depending on a certain package?
I'm on debian 6.0 Squeeze-LTS (the first-time extension to squeeze for long term support!) for my web server, and it reports that support has ended for a certain package:
Unfortunately, it has been necessary to ... |
Why it is installed:
aptitude why libplrpc-perl
What depends on this package:
aptitude search '~i~Dlibplrpc-perl'
What would happen, if libplrpc-perl is removed:
aptitude -s purge libplrpc-perl
| How to find the packages that depend on a certain package in apt? |
1,407,811,285,000 |
systemctl list-dependencies postgres
Will list all the dependencies of the postgres service.
How do I find all the dependents of a service (or unit, or target)?
|
$ systemctl list-dependencies systemd-sysusers.service --all --reverse
systemd-sysusers.service
● └─sysinit.target
● ├─accounts-daemon.service
● │ └─graphical.target
● ├─acpid.path
● │ └─paths.target
● │ └─basic.target
● │ └─multi-user.target
● │ └─graphical.target
man systemctl:
list-dep... | Systemd: Find dependants of service |
1,407,811,285,000 |
I'm an OpenBSD user. In the OpenBSD FAQ it says:
OpenBSD is a complete system, intended to be kept in sync. It is not a kernel plus utilities that can be upgraded separately from each other.
When you upgrade a system, you do so in one go; the kernel and the base system is replaced. Then you go and update your 3rd p... |
Linus Torvalds has a very strong opinion against kernel changes resulting in userspace regressions (see the question "The Linux kernel: breaking user space" for details).
Interface between userspace and kernel is provided by system calls. Newer kernels can have more system calls, and changes in exiting ones when those... | Updating the Linux kernel, while leaving rest of system as is |
1,407,811,285,000 |
I'm currently running Debian testing (Wheezy) and am trying to get SCIM working. I want to install the scim-pinyin package, but there is no such package available in the testing repository, although there was one in the previous stable (Squeeze) repository. There is a copy of the package in unstable but not for my arc... |
In this case, yes, it's possible and safe.
As debian keep dependences tree for each requested package.
At all there is still a risk that some libraries could not exist in two different version together in same installation, due to conflict (port reservation, device driver and so). In this kind of situation, apt would ... | Debian: Is it possible/safe to install packages from an older version of the repository? |
1,407,811,285,000 |
The definition given in the man for systemd unit is a bit unclear: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
If a unit foo.service contains a setting Before=bar.service and both
units are being started, bar.service's start-up is delayed until
foo.service is started up.
[...]
After= is... |
You only need one of After= or Before= in your pair of units. You might prefer this from the man page for systemctl:
--after ... any After= dependency is automatically mirrored to create
a Before= dependency.
Use this option with list-dependencies to check what you think systemd should be doing. Eg
$ system... | systemd Before and After declarations |
1,407,811,285,000 |
Some packages, have a Provides: header. For example, the package postfix on Debian Wheezy has Provides: mail-transport-agent.
The package mail-transport-agent which doesn't exist physically is considered as a "virtual" package.
How can I know, on a Debian based system, if a given virtual package is "installed" (or "... |
To list packages providing mail-transport-agent:
$ aptitude search '~Pmail-transport-agent'
p citadel-mta - complete and feature-rich groupware server
p courier-mta - Courier mail server - ESMTP daemon
p dma - lightweight mail transport ... | How can I know if a virtual package is "installed" on a Debian system? |
1,407,811,285,000 |
For example, I can't install package qcad because of error: "can't find qdict.h".
How can I find the package which provides the file qdict.h so I can install the package qcad?
|
You may use the e-file command from the pfl package (emerge -av app-portage/pfl) to search by package contents.
e-file YOURFILE
Alternatively, you may use an online database.
Regarding the qcad package specifically, you probably need the Qt4 package. IIRC, use emerge -av x11-libs/qt-gui (If that doesn't work out, try ... | How to find which package provides a file? |
1,407,811,285,000 |
I've written a program that uses a Postgres database, and I wrote a systemd service file for it. Currently my service gets started on boot just fine, and it gets stopped when Postgres is stopped for upgrading (by apt upgrade). However, when the upgrade is complete and Postgres is started again, my service is not autom... |
I found the answer: I needed to change the last line of the service file to:
WantedBy=postgresql.service
This way, whenever Postgres is started, my service is started too - but if my service fails, that doesn't stop Postgres.
Directives in the [Install] section only affect enabling and disabling of units. But it wasn... | How to get my systemd service restarted when its dependency is upgraded |
1,407,811,285,000 |
Here's what I would like:
Start with a virtual system, with no installed packages. Then I invoke a tool, similar to apt-get to ask it to compute the dependencies and mark all the packages that would be installed as installed.
Let me be clear: It says the packages are installed, but there are no files actually instal... |
You're probably best off hooking into one of the scripting interfaces that Debian has for their various package tools and writing your own simulator.
(Edit: I can't find dpkg-perl and dpkg-python anymore. dpkg-awk and dpkg-ruby exist, but they don't look like they'll do the job.)
However: Debian has a tool "equivs" t... | Is it possible to simulate installation of Debian packages, and still marking them as installed? |
1,407,811,285,000 |
I installed Opera 12.16 from a .deb for reasons. Just assume that I need this specific browser of this specific version and that there’s no alternative.
However, that deb depends on packages (such as the gstreamer0.10 series) which are not in my distribution anymore (Debian testing). This makes apt fail on every opera... |
You can’t make apt ignore dependencies, but you can create a fake gstreamer0.10-plugins-good package which will satisfy the missing dependency. The simplest way to do this is using equivs:
install equivs
sudo apt install equivs
generate a template control file
equivs-control gstreamer0.10-plugins-good.control
fix t... | How to make apt ignore unfulfilled dependencies of installed package? |
1,407,811,285,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 instal... |
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 y... | How to convince dpkg that libssl1.0.2 is >= libssl1.0.0? |
1,407,811,285,000 |
Apt handles dependencies among packages installed from its repositories or *.deb files. However, what about software that users have compiled and installed from source with ./configure && make && make install without creating a .deb file first? Is it possible that Apt could remove packages needed by such softwares? ... |
APT doesn't know anything about software that was installed manually. It doesn't know what libraries that software needs or anything.
When APT installs a package only to fulfill the dependencies of another package, this package is marked as automatically installed. If you remove all the packages that depend on an auto... | Could Apt delete packages that are need by software that users have installed from source? |
1,407,811,285,000 |
There is an executable I want to install on a computer that I can't recompile that wasn't built as a package, and I want to download the libraries it requires to run them.
Below is part of the output from running ldd on it
libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xb702f000)
libcairo.so.2 => /us... |
You have not said which OS you are using so I am going to assume Linux and will use Debian as an example. The quick answer to your question is no as far as I know. This might be a useful workaround though:
ldd your_prog | awk '{print $1}' | sed 's/\..*//' |
while read n; do echo "----- $n ----"; apt-cache search ^$... | Is there a way to determine what packages or libraries should be loaded to support an executable? |
1,407,811,285,000 |
I am using CentOS 7. I installed okular, which is a PDF viewer, with the command:
sudo yum install okular
As you can see in the picture below, it installed 37 dependent packages to install okular.
But I wasn't satisfied with the features of the application and I decided to remove it. The problem is that if I remove ... |
Personally, I don't like yum plugins because they don't work a lot of the time, in my experience.
You can use the yum history command to view your yum history.
[root@testbox ~]# yum history
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager, verify, versionlock
ID | Login user ... | How to remove all installed dependent packages while removing a package in CentOS 7? |
1,407,811,285,000 |
I want to get a list of packages which depend on requested package. For example, I want to get all packages, which depend on telnet. I came up with this script:
for i in `rpm -qa | sort`;
do rpm -qR $i | grep telnet > /dev/null;
if [ $? -eq 0 ]; then
echo $i;
fi;
done
Is there a better way to go?
Than... |
The command you need is:
rpm -q --whatrequires <packagename>
Therefore:
rpm -q --whatrequires telnet
From the man page
--whatrequires CAPABILITY
Query all packages that require CAPABILITY for proper functioning.
| Check which RPMs depend on this package |
1,407,811,285,000 |
I am attempting to install git on Debian 8.6 Jessie and have run into some dependency issues. What's odd is that I didn't have any issues the few times I recently installed Git in a VM while I was getting used to Linux.
apt-get install git
Results in:
The following packages have unmet dependencies:
git : Depends: l... |
You should edit your sources.list , by adding the following line:
deb http://ftp.ca.debian.org/debian/ jessie main contrib
Then upgrade your package and install git:
apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get -f install
apt-get install git
Edit
the following package git , liberror-perl and [rs... | Unmet dependencies while installing Git on Debian |
1,407,811,285,000 |
I have a custom package foo with a dependency in the control file on a fixed version of another package bar:
Depends: bar (= 1.2.3)
Both the foo and the bar packages are published in my own repo. Furthermore I have multiple versions of bar in the repo, say, 1.2.3 as well as 2.1.0. Now, when trying to install foo on a... |
The apt resolver does not consider the possibility that you might want to install something that is not the most recent available version of a package in a given target release; Debian just doesn't support installing anything but the most up to date version of a package for your system.
If you're using different repos... | apt-get not properly resolving a dependency on a fixed version in a Debian/Ubuntu package |
1,407,811,285,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 ..... |
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... | dpkg: dependency problems prevent configuration of initramfs-tools |
1,407,811,285,000 |
In this example of a systemd unit file:
# systemd-timesyncd.service
...
Before=time-sync.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-sync.target
systemd-timesyncd.service should start before time-sync.target.
This defines an ordering dependency.
But at the same systemd-timesyncd.servic... |
The use case of this double relation is similar to a “provides” relation. systemd-timesyncd provides a time synchronisation service, so it satisfies any dependency a unit has on time-sync.target. It must start before time-sync.target because it’s necessary for any service which relies on time synchronisation, and it w... | "before" and "want" for the same systemd service? |
1,407,811,285,000 |
Upgrading my Debian 'bullseye' distribution does not work due to unmet dependencies.
Operating System: Debian GNU/Linux bullseye/sid
Kernel: Linux 5.6.0-2-686-pae
Architecture: x86
When I try to upgrade my system by using apt update followed by apt upgrade, I get:
Some packages could not be installed. T... |
Since there’s just been a gnustep-base transition in testing from 1.26 to 1.27, involving an upgrade from libgnustep-base1.26 to libgnustep-base1.27, you need to allow package removals during upgrade: use
apt full-upgrade
instead of apt upgrade.
| Debian 'bullseye' - no upgrade due to gnustep-base-runtime unmet dependencies |
1,407,811,285,000 |
I'd like to try PHP7.0 on Debian Jessie and am trying to install it from sid. However, php7.0 depends on php7.0-common which depends on php-common > 18 while php-common in sid is at 17. Does this mean it's simply impossible to install php7.0 from this distribution at the moment? Why is that?
I know that it is possible... |
You have unofficial repos with new versions. Using Debian one of the best well-known repository for most up-to-date software for web servers for i386 and amd64 packages is dotdeb.
"Dotdeb is an extra repository providing up-to-date packages for your Debian servers"
They have PHP 7 since the 3rd of December (of 2015)... | Installing PHP7.0 from sid on jessie |
1,407,811,285,000 |
These are the requirements and instructions on how to install Apache on Linux.
http://httpd.apache.org/docs/current/install.html
So I've installed everything (c++ compiler, apr and apr-util) to be able to install Apache correctly.
The only thing left is PCRE, I've installed it and it's located in my /usr/local/src/pcr... |
This solved it.
First I installed pcre in /usr/local/pcre, using
./configure --prefix=/usr/local/pcre
make
sudo make install
Then installed apache with
./configure --with-included-apr --with-pcre=/usr/local/pcre
make
sudo make install
| Apache installation configuration can't find PCRE? ( pcre-config for libpcre not found ) |
1,407,811,285,000 |
I've installed the program Motion on one Linux machine (M1) and want the same program on another (M2).
There are various builds of this program, and I have forgotten which one I have used, so can I do a straight copy of the user/bin/motion file from M1 and place it in the user/bin/motion of M2?
I know where the config... |
For moving one program to other computer you have to move:
1) Executable file
A simple way to finding commands path is type command.
For example: type cal
cal is /usr/bin/cal
2) Library dependencies
You can find library dependencies with ldd command, But remember if you compiled a program from source the CPU Archit... | Portability of an executable to another Linux machine |
1,407,811,285,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 believ... |
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 ar... | What does a tilde (~) mean at the end of a dependency requirement in a deb file or in apt? |
1,407,811,285,000 |
I got this weird thing going on where,
pacman -S -w awesome xorg-xinit xorg-server xorg-server-utils
pacman doesn't download all the required dependencies.
The reason for downloading the packages is because I'm creating a local repo with only the specific packages to my neededs. (instead of downloading the whole repo... |
As pointed out by Earnestly and demonicmaniac3 over at #archlinux irc channel, this is because pacman won't re-download anything if it's already locally installed. But it will download whatever it is you're specifically instructing it to, which make a whole lot of sense come to think of it.
This means if you're trying... | pacman doesn't download dependencies with -S and -w? |
1,407,811,285,000 |
I want to remove some of the paths the linker uses to find .so libraries for testing purposes.
I have found a way to add library paths:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/library"
Are there a variable similar to LD_LIBRARY_PATH that I can use to remove library paths such as /usr/local/lib or /usr/lib t... |
You would be interested in removing library paths if a given shared library has embedded paths via the rpath feature. Those are added at the time the library is created by the linker.
You can remove (or alter) those paths using chrpath, e.g.,
chrpath -d mylibraryfile.so
Removing pathnames from the LD_LIBRARY_PATH va... | How to change the paths to shared libraries (.so files) for a single terminal instance |
1,407,811,285,000 |
We have development environment on FreeBSD 10.3. I've heard that FreeBSD manages package dependencies in that way, that it always looks for the newest version of all packages, which main package depends on. And it looks like true. So, my questions are:
Is this true? is there any official documents that prove it?
The ... |
How FreeBSD Builds Packages
The FreeBSD project used to build packages only for releases and occasionally for the STABLE branches. The old package builders used a distributed system named Portbuild. It would use a large cluster of smaller 2GB-4GB machines to build packages. This was error-prone and slow, mostly due to... | Is it possible to set specific version of packages, which main package depends on? |
1,407,811,285,000 |
something like
sudo apt build-dep apache
Supposedly installs all the dependencies needed to build apache from source (I've never used it before).
Is there an equivalent command for the dnf package manager?
|
There is, it's
sudo dnf builddep httpd
builddep is a dnf plugin, so it's not documented in the dnf manpage. It is described in the DNF plugin documentation, and it has its own manpage, dnf.plugin.builddep(8).
| Does dnf have an equivalent to apt's "build-dep" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.