Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [error-handling]

Use this tag for questions on how to handle errors generated in shell scripts.

Filter by
Sorted by
Tagged with
0 votes
2 answers
116 views

How to execute command if previous command fails with return code 0

I have a script which logs in to a server. Regardless of the success (i.e. whether the password is valid or not) the script will exit with return code 0, and the text: Error login failed. I'd like it ...
Nickotine's user avatar
  • 489
1 vote
1 answer
49 views

bwrap: execvp com.github.tchx84.Flatseal: No such file or directory flatpak

Some background of what happened. I was playing with Flatseal to try few themes on my flatpak appliacations, and after some workarounds here and there, I accidently removed some file section in the ...
Bhaumik Tripathi's user avatar
0 votes
2 answers
50 views

tar: ./.tar.gz: file changed as we read it | "Flagged" files are unrelated to the file tar is supposed to operate on

I am trying to use tar to recursively compress all files with the .lammpstrj extension within the directory tree starting at the directory whose path is stored in the variable home. home contains the ...
Felipe Evaristo's user avatar
0 votes
0 answers
54 views

bash: is it possible to make `errexit` work inside conditionals?

Consider the following script: #!/bin/bash set -o errexit -o xtrace qux() { false echo QUX } quux() { qux ||: echo QUUX } quux Running this script produces: + quux ...
Azat Khabibulin's user avatar
0 votes
0 answers
26 views

Cannot capture a handshake when sniffing

I cannot find a way to get a Handshake from my own wireless network, which has a WPA2 encryption. Please, note that this is not the first time I do this at all. In fact, I've captured tons of ...
Mike Walter's user avatar
0 votes
0 answers
272 views

How to deal with ALSA errors

Using some very simple example code to do speech-to-text in Python it works, but spews out a stream of the following errors and warnings: Cannot connect to server socket err = No such file or ...
AlphaCentauri's user avatar
1 vote
1 answer
88 views

Bash parameter substitution with multi line error message

I'm using parameter substitution with an error message, such as ${var1:?'some message'}. I've incorporated a multi-line error message. Presently, it only functions properly when enclosed within single ...
programmer Erfan's user avatar
0 votes
1 answer
52 views

Some GTk3 applications aborting with BadAccess when DISPLAY=:0 but not DISPLAY=hnam.local:0 or even DISPLAY=unix:0

I've had some issues with my XQuartz environment not starting due to a bit of a freak reason that was a rather hard to figure out. It's (mostly) working again but I must have caused another regression ...
RJVB's user avatar
  • 254
3 votes
1 answer
205 views

How to code defensively in Bash for unhandled runtime errors within logical expressions?

I just encountered an error where a function was missing in my script. I already trap and raise these exceptions to stop the script early, but I noticed that did not occur. Investigating this further, ...
Zhro's user avatar
  • 2,709
0 votes
0 answers
20 views

errexit and lists [duplicate]

set -eu sh -euc 'echo 1; false; echo 2' || echo fail f() { echo 1 false echo 2 } { echo 1; false; echo 2; } || echo fail ( echo 1; false; echo 2; ) || echo fail f || echo fail Output (at ...
x-yuri's user avatar
  • 3,463
-5 votes
1 answer
57 views

virtual machine stuck [closed]

My virtual machine stuck on this and just keep downloadin for hours please solve
muhammad wajahat ali khan's user avatar
0 votes
1 answer
281 views

grep: /proc/cpuinfo: No such file or directory

I am using a Mac computer and I get this message when running mirdeep2 mapper.pl script: grep: /proc/cpuinfo: No such file or directory
gkarere's user avatar
0 votes
0 answers
25 views

What's the equivalent of the apport-retrace (Ubuntu) command for Debian?

I have some freezing troubles I cannot find the cause for a long time on my Debian VM, and I'm interested in using a command apport-retrace that a Linux magazine I've bought promotes to do some ...
Marc Le Bihan's user avatar
2 votes
1 answer
247 views

SSH session termination on script error when sourcing multiple sub-scripts

I'm facing an issue with SSH on a server. Running individual scripts (source s01.sh, etc.) works fine, with errors displayed in the console. However, when using a master script to source these scripts,...
jay.sf's user avatar
  • 227
0 votes
1 answer
50 views

Error with kali linux win-dex-install

I just installed wsl kali Linux on Windows but this error came up while installing win-dex -y command. I need this for class and I can't figure it out. I'm new to Linux and need help, please. What ...
Keke V's user avatar
  • 1
0 votes
1 answer
149 views

failed to prepare transaction (could not satisfy dependencies) problem with networkmanager

sudo pacman -Syyu :: Synchronizing package databases... core 130.1 KiB 102 KiB/s 00:01 [###############################################] 100% extra ...
Deric's user avatar
  • 1
0 votes
0 answers
330 views

`smartctl` and `smartd` commands not working

I have been receiving hard disk warnings from the smartd daemon for a while now (every 24 hours), saying that my error logs have increased. I have been trying to examine this by checking my log files, ...
tobibox's user avatar
0 votes
0 answers
1k views

Unable to enumerate USB device - RHEL 7.9

I get this error when booting up: usb usb5-port2: unable to enumerate USB device Its a Gigabyte server, any advice would be greatly appreciated! Thank you
psmarc's user avatar
  • 1
0 votes
0 answers
197 views

How to fix Parrot OS Installation interrupt? - common_interrupt: 1.55 No irq handler for vector

I was trying to install Parrot OS installation. But it appears the interrupt message if I install and it will stuck on the terminal I already Flashed parrot os using balena etcher and after that I ...
Serella's user avatar
0 votes
0 answers
629 views

Linux kernel build fails with sed: can't read modules.order: No such file or directory

I am trying to build Linux Kernel for the first time and I am facing below issue while trying to make modules_install sed: can't read modules.order: No such file or directory make: *** [Makefile:1483: ...
Devansh Jani's user avatar
0 votes
0 answers
47 views

Installing sile from source fails

I am trying to install sile. A Debian package is not provided yet so I decided to build from source. Manual Install Lua $ curl -R -O http://www.lua.org/ftp/lua-5.4.6.tar.gz $ tar -xf lua-5.4.6.tar....
gsv29820's user avatar
0 votes
0 answers
631 views

How could I solve "ModuleNotFoundError: No module named 'pheweb.command_line'"

I am trying to run a software called 'Pheweb' on Ubuntu. I followed the guideline here but got 'permission denied' error when I ran 'pip3 install pheweb'. So I installed with this code: sudo apt-get ...
syl's user avatar
  • 1
0 votes
0 answers
116 views

I have some error when I upgrade through terminal in kali OS

The following packages have unmet dependencies: gnustep-base-runtime : Depends: gnustep-base-common (= 1.29.0-4) but 1.28.1+really1.28.0-5 is to be installed libgnustep-base1.29 : Depends: gnustep-...
PawanBindha's user avatar
0 votes
0 answers
316 views

Error mounting /dev/sdb2 at /media

The address could not be accessed. I'm trying to mount the disk, but I can't because of an error
Антон Желіховський's user avatar
0 votes
1 answer
130 views

rsyslog: capture errors from "omprog" script

I am using custom python script to process logs, and ban offending IPs. Here is the line from my /etc/rsyslog.conf: local0.* action(type="omprog" name="asterisk" binary="/usr/...
Martin Vegter's user avatar
0 votes
2 answers
195 views

Remove exact line from file if present, leave the rest of lines; error-handling - how to go about it

I am not exactly sure how text processing should be done in a good way, so let me ask. I have this file: ~/.config/mpv/input.conf containing possibly other options as well as v disable. If I want to ...
Vlastimil Burián's user avatar
-1 votes
1 answer
68 views

Troubleshooting DNS access issue on local network

I have installed a DNS by creating the two zones on my server, CentOS 7. Here are the steps: vi /etc/hosts etienne credo.local etienne yum install bind bind-utils vi /etc/named.config zone"...
etienne's user avatar
0 votes
0 answers
635 views

AlmaLinux Postgersql installation error

I've followed the instruction at here to install Postgresql at AlmaLinux. But the error persists. $ sudo yum install -y postgresql15-server The error: PostgreSQL 9.6 for RHEL/CentOS 8 - x86_64 ...
Igor Savinkin's user avatar
8 votes
1 answer
15k views

How to transfer files from linux to iphone?

I have the libimobiledevice family and ifuse package installed. When I connect my iPhone to Linux via USB cable I get the prompt to allow access. When I confirm, I can access the DCIM folder on gnome ...
zpc5679's user avatar
  • 81
1 vote
1 answer
98 views

Unable to delete data of flatpak - connection is closed error

I was using KdenLive but I messed up some of the settings so I decided to do a fresh install. When I used the GUI to remove then reinstall, the settings were intact. Then I went to the terminal and ...
hfd97726's user avatar
1 vote
0 answers
241 views

What is this Java error about for maven on Ubuntu: package org.apache.http.client does not exist import org.apache.http.client.ClientProtocolExcepti?

I am using Java and Maven Project on Ubuntu but I am getting following error upon building Java code on NetBeans IDE: package org.apache.http.client does not exist import org.apache.http.client....
P_Z's user avatar
  • 111
2 votes
1 answer
246 views

Using set -e (errexit) with block of commands and executing another on fail of that block (SC2181)

I just found out about set -e as I was searching for an answer to "how to run many commands (without &&) and immediately stop on non-zero exit code of any of them?". The set -e was ...
Andrew15_5's user avatar
5 votes
2 answers
29k views

Conflicting values set for option Signed-By regarding source

I was installing Docker Engine on Ubuntu 22.04 using the following link https://docs.docker.com/engine/install/ubuntu/, everything was okay until I reach sudo apt-get update, it gives me the following ...
ma r's user avatar
  • 57
1 vote
1 answer
1k views

error handling in a bash subshell

I'm writing some bash code, and I'd like the script to exit if there's any error. The set -e trick works pretty well, but not with subshells. Here's a simplified example: set -e chmod a=r file.txt x=`...
jyoung's user avatar
  • 111
0 votes
1 answer
137 views

Run a command in background and independent of terminal and run alternative if fails

Goal: To run a command independent of the terminal and return immediately. And if the command fails run an alternative commands independent of the terminal and return immediately. I did the following. ...
Porcupine's user avatar
  • 2,066
0 votes
1 answer
585 views

Bash using || operator for command error check - how to run two commands in error check?

I have just realized that using || operator as a check to see if a command completed with successfully doesn't handle multiple commands after the ||. Here is an exert from my script, I am waiting for ...
user avatar
0 votes
1 answer
2k views

Pseudo Terminal Error :: "mesg: cannot open /dev/pts/2: Permission denied"

On my Ubuntu 20.04.5 machine, I have a Perl script running under userA's account. The script issues this command: sudo su - userB -c "ssh -l userB 10.0.0.1 ls -tr /some/remote/directory" (...
Pete's user avatar
  • 105
1 vote
1 answer
617 views

Error messages everytime GUI text editor is opened from terminal

Whenever I open Gnome Text Editor from the terminal using the command gnome-text-editor ./example.txt, I get the following error messages: (gnome-text-editor:9560): dconf-WARNING **: 00:00:58.433: ...
hist78893's user avatar
0 votes
1 answer
193 views

How to find out the source package / traceback of an error message in KDE?

When I start plasmashell with kstart5 plasmashell in Debian11/KDE I get an error message (error creating screencast "Failed to connect PipeWire context") that I'd like to see the source ...
mYnDstrEAm's user avatar
  • 4,398
-1 votes
1 answer
33 views

How to error out main script, after few iterations

I'm trying to build logic for the pseudo-code below: if 'main' job fails sleep 60 re-trigger main job for 3 times. after re-triggering for 3 times if it still fails , then kill the main job . ksh ...
buchiki's user avatar
0 votes
3 answers
2k views

Ubuntu throws this error: error found when loading /home/user/.profile

I'm using ubuntu 22.04 LTS. The error occurs after entering my user. This is the description of the error: error found when loading /home/user/.profile tput: no value for $TERM and no -T specified ...
Davi Freitas's user avatar
4 votes
1 answer
3k views

E: The repository 'http://security.ubuntu.com/ubuntu impish-security Release' does not have a Release file

when I try to command : sudo apt update this error was shown: E: The repository 'http://security.ubuntu.com/ubuntu impish-security Release' does not have a Release file. N: Updating from such a ...
Javad Kefayati's user avatar
0 votes
1 answer
2k views

Invoking "make -j16 -l16" failed

I want to simulate Tiago robot in Gazebo and I am using ROS available package. Before, I simulated it without problem but right now I can not. I am using ROS melodic and ubuntu 18.04 on KVM virtual ...
Pouyan's user avatar
  • 13
0 votes
1 answer
919 views

How to fix these arch linux errors

So i run this command sudo journalctl -p 3 -xb to check errors and i got a lot of these errors . how to fix these ? Jul 17 13:46:27 tanuj kernel: x86/cpu: SGX disabled by BIOS. Jul 17 13:46:27 tanuj ...
Tanuj Rarh's user avatar
-1 votes
1 answer
647 views

Why does my Kali Linux system suddenly restart at odd times?

My Kali Linux system suddenly rebooted at 19:05. It used to be rebooted at certain times. Where does the problem come from? Why does this happen? /var/log/syslog: Jun 22 19:00:11 sz dbus-daemon[1107]: ...
mehran's user avatar
  • 3
0 votes
1 answer
2k views

Cannot open firefox on Arch Linux

I just used archinstall to install arch in VirtualBox with the xorg profile and also installed htop, neofetch and firefox. When I typed htop into the command line, htop launched: That looks, normal ...
bdsap's user avatar
  • 1
0 votes
1 answer
1k views

Initramfs error when apt-get upgrade

I'm getting an error everytime i do an apt/apt-get upgrade. I've searched everywhere online for solutions but couldn't find anything Here's the error i get code: apt-get upgrade Reading package lists.....
Rayen M Sulphi's user avatar
1 vote
0 answers
66 views

Typo3 - Folder "/" does not exist - Error

When I am in the backend in the filelist Module or want to link something, I get the error message: "#1314516810: Folder "/" does not exist." (see screenshot). The folder exists of ...
conan's user avatar
  • 11
0 votes
1 answer
1k views

How can I check if the first command on a pipe gets an error?

Let's say I execute the following command on a terminal: this-command-doesnt-exist-and-closes-with-code-127 | jq '' If I execute echo $? I'll get 0 as result because it's checking the exit code from ...
raylight's user avatar
  • 491
1 vote
0 answers
479 views

im trying to install backports in my kali linux but im getting an error while using the code line " make list-defconfigs"

im trying to install backports in my kali linux but im getting an error while using the code line " make list-defconfigs".screenshot I have done both apt update and upgrade and search ...
Rayen M Sulphi's user avatar

1
2 3 4 5
7