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
0answers
7 views

umask: fs, option, superblock, codepage, helper error

mount works fine, but mount -o umask=0 gives mount: /home/user/sdb1: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.. It happens only for ...
0
votes
0answers
8 views

npm: npm ERR! Failed at the node-pty@0.6.10 install script. When installing Node OS and node-gyp

I tried asking this on stack overflow, but it's taking awhile to answer, and I feel also that Unix/Linux would be a better place to ask this, since I am using Linux to build Node OS (which is based ...
0
votes
1answer
21 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, ...
0
votes
0answers
22 views

How to grab output of a remote ssh command with until-loop in a variable

Below is my until loop that fires a printer command to a remote host using ssh until ssh root@45.76.165.127 'lp -d Brother_HL_L2350DW_series /root/moht/Printed/`basename "$FILE"`' do echo &...
0
votes
1answer
14 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 ...
0
votes
0answers
30 views

error: partition / too full: 459317 blocks needed, 161082 blocks free

I Have raspberry pi with 128 gb sd card. Tring to install plasma on arch. But while installing it says Checking for file conflicts Checking available disk space And then error partition / too full: ...
0
votes
0answers
11 views

error message appearing every time i open the pop-shop

I have only started using linux for less than a week now and I tried getting f.lux for linux(which didn't work) and then I noticed that there's night mode already in pop_os. Ever since that attempt I'...
2
votes
2answers
37 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
1answer
33 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 ...
0
votes
2answers
47 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 ...
-1
votes
2answers
57 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
2
votes
2answers
103 views

got “tar: /path/to/my/dir: Not found in archive” error while verifying created archive

I did compress a directory to .tar.xz archive format with this command: tar --create --verbose --file myArchive.tar.xz /path/to/my/dir then,I tried to check health of created archive with following ...
0
votes
0answers
39 views

linux non recognize usb hdd

First of all thank you for the help, and my apologize because I don't have a deep knowledge on this kind of things. I've a Toshiba StoreE HDD USB drive that don't want to work. When I use dmesg shows ...
0
votes
1answer
533 views

Why am I receiving the “zsh: exec format error: ./metal” error?

I am attempting to run a Unix executable program (Metal; https://genome.sph.umich.edu/wiki/METAL_Quick_Start) from the terminal. I continue to get the following error: zsh: exec format error. I have ...
0
votes
0answers
28 views

File package conflict when trying to upgrade distro

I am upgrading from Fedora 30 to 32 and getting a file conflict. How can I resolve this? I ran: sudo dnf system-upgrade download --releasever=32 --allowerasing which failed with Error: Transaction ...
0
votes
1answer
748 views

Tar: File changed as we read it/ file removed before we read it Errors

I'm trying to create an automated backup script using the tar command: tar -czg /home/user/BackupArchiv/snapshots/snapshot_2020-10-12 -f /home/user/BackupArchiv/backup_2020-10-12/backupfull.tar.gz /...
-4
votes
2answers
90 views

Is it possible to pipe only on error? [closed]

If there is any error then 2>&1 and pipe (|) to another program, otherwise do not 2>&1 and do not pipe
0
votes
0answers
97 views

Kazam not opening at all. Linux mint 20

I reinstalled it several times but no success at opening it at all! Here is the terminal output: $ kazam WARNING Kazam - Failed to correctly detect operating system. Traceback (most recent call last): ...
3
votes
1answer
99 views

subshell not propagating error, bash 4.4

I have this in a github workflow - run: bash --version - name: run postgres run: | set -e shopt -s inherit_errexit export ID=$(docker run \ ...
0
votes
1answer
22 views

Error: “/bin/sh: 1: /usr/local/lib/node_modules/wasm-opt/out/wasm-opt: not found” returns with exit status 0!

So I borked an installation of a bin, and when I try to run the command (wasm-opt input_file.wasm) I get this: /bin/sh: 1: /usr/local/lib/node_modules/wasm-opt/out/wasm-opt: not found But that ...
0
votes
0answers
208 views

systemd-sysusers: Failed to check if group nobody already exists

I'm using Debian Buster. On several of my devices I find these red alerts in the systemd journal, even on a fresh installed Buster without additional installed software: Oct 01 09:18:41 harley systemd-...
0
votes
0answers
18 views

Uncorrectable Error in Hard Disk

My understanding is T10-DIFF/DIX( also known as T10-PI) was proposed to prevent silent data corruption. And of the hard disk/SSD vendors have already implemented/adopted this solution as part of their ...
1
vote
1answer
374 views

Search for a string in all searched files gives /bin/grep: Argument list too long error

I tried the below command to search for in all files user /var sudo find . -type f | xargs sudo grep 202007602 | tee /tmp/202007602.log Output: grep: ./www/html/jenkins/workspace/node_modules/xpath/...
2
votes
0answers
17 views

Script configuration issues

My purpose is to allow user A to run a specific script owned by user B but with user B’s profile loaded. This is on a Solaris maachine. I have users A and B, I set this line: in the sudoers file, so ...
0
votes
0answers
39 views

mutt macro to save attachment fails when file already exists

My .muttrc includes macro attach s <save-entry><bol>/myDir/<enter><shell-escape>chmod\ -R\ a+r\ /myDir/.<enter> When I hit s, this saves an attachment into /myDir. But ...
0
votes
1answer
28 views

how to suppress error message in Unix for apache

I know that we can suppress error message when the command is ls ls /usr/tbin/httpd || /home/app/httpd/bin/apachectl 2>/dev/null However, i want to suppress No such file or directory for the below ...
0
votes
0answers
9 views

How to resolve dpkg error in terminal while installing python

I face this problem while installing python3.7 in raspberry pi 3. I had attached the terminal commands and errors below. Kindly have a look at it and hep me to resolve this
0
votes
0answers
183 views

KDE-Neon doesn't start anymore. ACPI region does not cover t sponse buffer. failed to add display topology, DTM TA is not initialized

I was using the User Edition of KDE-Neon without issues for some time but now I got this error and I am clueless. I am very thankful about every response. I was searching for similar problems on ...
-8
votes
1answer
49 views

apt-get update error [duplicate]

root@kali:~# apt-get update Get:1 https://mirror.karneval.cz/pub/linux/kali kali-rolling InRelease [30.5 kB] Reading package lists... Done E: Release file for https://http.kali.org/kali/dists/...
2
votes
0answers
31 views

Why does trap not get triggered when a sourcing a file that does not exist?

#!/bin/bash set -eEuo pipefail set -x function deploy_cleanup(){ echo "---Cleaning up---" echo "hello" } trap deploy_cleanup ERR whoami source euaueoaue Outputs: + ...
5
votes
2answers
494 views

How to continue cascaded pipeline commands after a failure

I am running a command and manipulating the output with my own script, but I don't want the main command to stop when my script fails. For example: a-command | tee logfile.txt | myscript when my ...
0
votes
1answer
282 views

Problem running commands with 'sudo' in Bash script

I have an installation script which appears to work fine and doesn't output any errors, but when running a command with one of the newly installed packages, I'm told I don't have permission to access ...
2
votes
0answers
30 views

If my Mac shut down because of a problem, how do I find the error report? [closed]

Sometimes my computer shuts down, and I get the "Your computer shut down because of a problem" alert. My question is, where can I find the error message resulting in this? Like if an application quits ...
1
vote
1answer
168 views

cron: send errors to syslog, instead of MTA

I don't have MTA installed on my desktop. Whenever there is a problem with a cronjob script, I see this in my logs: CRON: (CRON) info (No MTA installed, discarding output) A script that was ...
0
votes
1answer
75 views

What does the error line prefix `W: ` mean, like from apt-get or other, similar command's?

It seem common knowledge that this is a warning message, but is this accurate? And if so, then where is it documented? (I've already searched the man pages for dpkg and apt-get and the web. I ...
0
votes
0answers
20 views

Running commands remotely and script not exiting on error

I have a simple script which takes the first argument as a hostname and tries to connect to it and run some commands then saves the output locally. But whenever I pass an invalid hostname and it ...
1
vote
1answer
215 views

How to capture error of failed command with message using tee command

I want to capture and write my error to log file along with custom message. Consider the command : $(find $val -type f -delete) || echo "error in deleting files" |tee -a log.txt This command writes ...
0
votes
2answers
76 views

Shell script runs with bash but not with sh. Why and how to fix it?

I have the following shell script that sums up all the arguments passed to it (space separated): sum=0 for arg in "$@"; do (( sum += arg )) done echo $sum I have saved it as SumAll.sh. So, its ...
0
votes
0answers
10 views

Problem with drivers nvidia

I installed Debian Buster Xfce in an all-in-one PC. The installation don't show any missing firmware, but when finished and started session can't use wifi, wireless driver missing. So I installed ...
1
vote
0answers
282 views

How to find out if xtigervncviewer wasn't able to establish a connection?

If I use xtigervncviewer to try to connect to a host which doesn't run a VNC server, it prints the following expected error to stderr: $ xtigervncviewer -AlertOnFatalError=0 localhost TigerVNC ...
1
vote
3answers
1k views

Errors when trying to upgrade Linux kernel

I've gone to upgrade my machine as I do every day and I've received the following errors: $ sudo apt-get update && sudo apt-get upgrade Hit:1 http://ftp.uk.debian.org/debian buster InRelease ...
0
votes
1answer
151 views

How to stop a (Perl) script on Unix exiting when it encounters errors? [closed]

I have a Perl script inherited from a colleague which processes some data for me. On our old server it will run and return several expected error messages before generating an output file for me. It ...
0
votes
1answer
260 views

docker-compose up -d quiet option to suppres up-to-date

I want to update a docker container in crontab and only get an email if something gets wrong, so I call 12 4 * * * cd /var/docker-services/mycontainer/; docker-compose pull -q && docker-...
0
votes
2answers
83 views

Bash: no output of while loop and any better solution?

I am new to bash scripting and the part of my script below doesn't give me any output. check="" while [ "$check"=="" ] do read -p "Signature Correct?(Yes/No): " check if [ "$check" != "Y" || "$...
0
votes
0answers
30 views

Linux MInt (intermittent) ACPI startup error

When I press the power button on my Linux Mint machine, one of two things (unpredictably) happens: Everything goes as it should and I eventually end up on my Desktop I get stuck on a black screen ...
1
vote
1answer
71 views

hiding a file from sudo rm -rf * (or skipping)

I am trying to hide one new file from a script that contains 'sudo rm -rf *' - I am wondering if I can do this without redoing the script/ if this is possible or not. I have tried the following: $ ...
0
votes
1answer
48 views

fastcgi php nginx errorlog messed up

I have a strange problem, the errorlog of my nginx server is somehow messed up: PHP errors seem to be all written in one line and repeating itself recursively. This way the llog grows a few GB within ...
1
vote
1answer
185 views

Piping errors to my function causes command to be ignored after 1 failure

Context: I have a Bash Script that copies files function log () { read IN if [ "$IN" == "" ]; then : else echo "$datetime"$'\t'"$IN" | tee -a logfile fi } function ...
1
vote
1answer
203 views

Can't login to Kali after upgrade

I'm running Kali from VMware. I upgraded my Kali, and after rebooting I can't login. When I restart I'm login automatically via tty1 , and receiving the following error: uname : loadlocale.c:129 : ...
0
votes
0answers
39 views

Bash inconsistent behavior between echo / assigning a variable with `set -e` and subshell [duplicate]

#!/usr/bin/env bash set -euxo pipefail echo $(echo "$THIS_VAR_DOES_NOT_EXIST" | cat) echo "WTF" Running this script produces: ./wtf.sh ++ cat ./wtf.sh: line 4: THIS_VAR_DOES_NOT_EXIST: unbound ...

1
2 3 4 5 6