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
0 answers
79 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....
  • 1
2 votes
1 answer
48 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 ...
1 vote
1 answer
2k 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 ...
  • 17
0 votes
1 answer
102 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=`...
  • 31
0 votes
1 answer
20 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. ...
  • 1,510
0 votes
0 answers
27 views

Recover from tg3 error

I have a Mac Mini Late 2014 with Debian installed on it that I use for home server. Sometimes I get a tg3_stop_block timed out error on it which crashes the network adapter and I'm unable to connect ...
  • 101
0 votes
1 answer
64 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 ...
  • 173
0 votes
0 answers
32 views

Fedora 24 dhcpd.service is not starting

Error Code Nov 30 23:36:00 Projserver.nspdom1.local dhcpd[2627]: This version of ISC DHCP is based on the release available Nov 30 23:36:00 Projserver.nspdom1.local dhcpd[2627]: on ftp.isc.org. ...
0 votes
0 answers
391 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" (...
  • 103
0 votes
1 answer
100 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: ...
0 votes
1 answer
25 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 ...
  • 3,694
-1 votes
1 answer
29 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 ...
0 votes
2 answers
557 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 ...
2 votes
1 answer
2k 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 ...
0 votes
1 answer
418 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 ...
  • 3
0 votes
1 answer
428 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 ...
-1 votes
1 answer
206 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]: ...
  • 3
0 votes
1 answer
958 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 ...
  • 1
0 votes
1 answer
707 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.....
0 votes
0 answers
46 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 ...
  • 1
0 votes
1 answer
511 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 ...
  • 341
0 votes
0 answers
215 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 ...
1 vote
0 answers
959 views

Permission denied: Linux KVM Share

When I tried to start the VM I get the following Error (Note, the host is a OpenSUSE Leap 15.3): Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", ...
  • 21
0 votes
1 answer
780 views

Can redirecting stderr and stdout to one file result in an error?

I'm writing a script that takes files (filename...) as arguments, and redirects both the stdout and stderr to a file of name filename.output. In the files are commands, and I'd only like to bash once (...
  • 3
1 vote
0 answers
111 views

Cant install Selinux policy

I am trying to install selinux on my librem14 pureos machine, every time I run sudo apt-get install selinux-policy-default I get: dpkg: error processing package selinux-policy-default (--configure): ...
  • 11
1 vote
0 answers
686 views

rclone android (Termux) error: "Fatal error: failed to mount fuse fs: fusermount: signal: bad system call"

I'm in the middle of trying to mount my OneDrive cloud files to my android phone via Termux v0.118.0. I've been able to install rclone and link my remote drive to the phone, where I can confirm ...
  • 187
1 vote
1 answer
7k views

Debian: The repository CDROM does not have a Release file

I have just finished installing Debian on my laptop; I had to add manually the drivers for my WiFi card after the installation, I simply installed them via sudo apt ./name.deb, where name.deb is a ....
  • 173
0 votes
0 answers
396 views

python script error

Recently, I redownloaded kali linux version 2021.4. I did the normal set up command "sudo apt update && sudo apt upgrade". After I finished the update I proceeded to copy a github ...
  • 99
-1 votes
1 answer
294 views

How to deal with Linux error: for 'ping', 'cannot execute binary file'

/home/$USER/bin/ping: cannot execute binary file: Exec format error $ uname -a Linux $USER 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Ping reinstall ...
0 votes
0 answers
32 views

System locking up upon shutting down

Today upon shutting down my System I was greeted with loads of errors and informations i do not understand. This happened yesterday also and it didn't seem to continue to shut down "normally"...
  • 13
16 votes
4 answers
4k views

Need the exit code of condition function when a Bash "while" loop terminates

I'm trying to get the exit code of the function that I'm repeatedly calling in the "condition" part of a Bash while loop: while <function>; do <stuff> done When this loop ...
  • 556
0 votes
1 answer
103 views

bash debug options?

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 ...
  • 601
0 votes
1 answer
242 views

What does this bcf error mean?

I ran this code to filter out biallelic variants from my vcf file: bcftools view --max-alleles 2 --exclude-types indels merged.ecDNA.vcf.gz>merged.ecDNA2.vcf.gz However, I got an error message: [E:...
0 votes
0 answers
1k views

How to update the sorces list on Pop!_OS?

I am trying to install and update my apps on Pop!_OS 21.04 but it keeps on saying that connection failed or the file has not yet been released. This only happens when I install files from http://us....
0 votes
0 answers
59 views

Sub-process returned error code (1), low boot memory

System specs: OS: Pop!_OS 20.04 It appears that my boot partition is running low on memory, and frankly, not entirely sure what or how that happened. I have some suspicions, but I feel like I'm ...
1 vote
1 answer
1k views

Connman error "passphrase required", but not making me input password

So I wanna connect to a wifi network, I click it and it doesn't show the window to input the password. It just shows this error: "GDBus.Error:net.connman.Error.PassphraseRequired: Passphrase ...
1 vote
2 answers
1k views

Retry a maximum of 10 times scp command until it succeeds

I wish to retry scp 10 times and print an error message if it failed. Below is my code: #!/bin/bash FILE=$1; echo $FILE; HOMEDIR="/home/ibro"; tries=0; while (system "scp -P 3337 $FILE ...
  • 417
0 votes
1 answer
359 views

When I need to make Firefox and brave run as root and transfare Xauthority this error appear

When I tried to run this command line cp -a /home/root1/.Xauthority .Xauthority ` this error appear, What the reason is? cp: cannot stat '/home/root1/.Xauthority': No such file or directory please,...
0 votes
0 answers
145 views

Npm won't install SOCKET.io due to Node version?

I need to install socket.io for my node program. So, whenever I try to install socket.io by running the following commandline instruction, it says node version needs to be greater than or equal to 10 ...
  • 133
0 votes
2 answers
446 views

Error output from ls -A results in error output, why?

I have a script I run regularly using cron. I would like to get notified by email when these scripts fail. I do not wish to be notified every time they run and produce any output at all. As such, I am ...
  • 183
0 votes
1 answer
667 views

Linux tar: You may not specify more than one tar '-Acdtrux', '--delete' or '--test-label' option

I am trying to install the latest Node on my Linux system by running the following terminal command, I keep getting the following error. tar: You may not specify more than one '-Acdtrux', '--delete' ...
  • 133
0 votes
1 answer
3k views

Grub rescue error (insmod normal)

I was trying to make it normal from grub rescue error. But, msdos7 is returning that filesystem is ext2. When I write insmod normal I get "invalid file name 'hd0,msdos7/i386-pc/normal.mod" ...
user avatar
0 votes
0 answers
33 views

I am trying to install MCScanX-transposon but it says makefile not found

I am trying to install MCScanX. MCscanX was installed successfully but I am getti9ng error while installing MCScanX-transposon. When I write make, it says no target specified. I also tried ./configure ...
  • 1
2 votes
1 answer
1k views

How do I access "netdev_dbg" logs?

I'm trying to debug my device which uses the qc7000 driver (qca_spi.c) It has a bunch of useful netdev_dbg messages scattered around. How can I access the logs where these messages are being stored?
  • 145
0 votes
1 answer
42 views

mint boot error multiple times

I earlier was having an issue. I had solved that also. But, I am facing it again. Same issue. Same error. It's been three times I have faced the issue. I had solved the issue same way every time. But, ...
user avatar
0 votes
1 answer
136 views

chroot error : "I: arm64 cannot be executed, falling back to qemu-user"

I set up a arm64 chroot named via this command: sudo mmdebstrap --architectures=arm64 buster myArm64Machine entered said chroot with command below: sudo chroot gnome-core-arm64 myArm64Machine one of ...
  • 99
2 votes
2 answers
299 views

How to choose an appropriate error prefix? [closed]

How can I figure out appropriate error prefixes to use when reporting various kinds of errors? Is there are guideline or overview of how these should be? I see patterns in many commands, but find it ...
0 votes
1 answer
2k views

Failed to fetch archive in apt

I am getting the below error while trying to install RSS software Liferea Evolution Facing problem for both. But I want only one. Error code: 404 Not Found [IP: 43.255.166.254 80] Fetched 10.6 kB ...
  • 1
0 votes
2 answers
158 views

how to fail on first error when using bash as a template tool

I am looking for a better version of set -e. That better version should just work™. I briefly read BashFaq/105 and tried this insane approach, but I still do not know how to fail on error. My use case ...
  • 101
-1 votes
2 answers
5k views

prevent error if file does not exist

I need to get the contents of a file but want to prevent an error if it does not exist. Is it possible to do something like this? cat my-file.txt || false
  • 1,699

1
2 3 4 5
7