Questions tagged [error-handling]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
86 views

System service running python code exit with error code status 1

_note: the original posted question is edited and its faced has changed quite a bit! Summary: A python script using apshceduler fails to load as service with exit code staus1. Important to note that ...
-1
votes
1answer
52 views

fatal error : linux/interrupt.h : no such file or directory

I am developing code for interrupt. When I am including #include <linux/interrupt.h>, I get fatal error : linux/interrupt.h no such file or directory Why am I getting this error and how can I ...
-2
votes
1answer
220 views

Issue using pip3 to install “face_recognition”, packages do not match hashes

When I give command pip3 install face_recognition in the raspberry pi terminal, It shows this error: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the ...
0
votes
0answers
27 views

EDUP WIFI instllation in Reaspberry pi error

I need to install the Wifi dongle into my raspberry zero for connecting to my home wifi modem, based on solving my previous question vi this link: https://raspberrypi.stackexchange.com/questions/...
-1
votes
1answer
31 views

Why is this bash script read line code giving me errors? [closed]

Why is this bash script read line code giving me errors? read -p "Does this require cropping? (y/n)? " answer case ${answer:0:1} in y|Y ) mkdir cropped; for i in *.mp4; do ffmpeg -i "$i" -filter:...
0
votes
0answers
15 views

Bluetooth file transfer PC-to-Android fails

on sending a file from a debian machine to an android device over bluetooth using the blueman-sendto command it finishes with an error: _on_properties_changed (usr/lib/python3/dist-packages/blueman/...
0
votes
1answer
307 views

E: Unable to locate package nvidia-graphics-drivers-418

My OS is Deepin 15.10. My GPU is NVIDIA Quadro 3000M. I want to play games on Linux. Steam has a program called Proton which enables this. Proton requires nvidia-418 or higher to work properly, so I ...
0
votes
3answers
102 views

Handle specific error in bash

As a part of my script, I want to publish package to nuget feed: dotnet nuget push package.1.2.3.nupkg --source "mysource" --api-key "mykey" The command may print error: 409 already contains version ...
0
votes
1answer
199 views

Update Failed: Download failed. cURL error 6: Could not resolve host:

I am getting the error "Update Failed: Download failed. cURL error 6: Could not resolve host:"  on WordPress on my vps server...I have also noticed it in other applications as well. As a consequence, ...
0
votes
1answer
31 views

ls reports nonexistent files first, ignoring the specified order

$ ls -lU a.txt test.sh badtest ls: cannot access 'badtest': No such file or directory -rw-r--r-- 1 gqqnbig gqqnbig 11 Apr 15 17:17 a.txt -rw-r--r-- 1 gqqnbig gqqnbig 11 Apr 16 17:22 test.sh Although ...
0
votes
1answer
105 views

Debian sources errors

When I try to update my packages on my Chromebook (with Linux installed on it) I do this: sudo apt-get update, and it gives me this error: Ign:1 https://deb.debian.org/debian stretch InRelease Ign:2 ...
0
votes
3answers
65 views

Linux/Debian dpkg & administrator errors

So today I ran into a bunch of errors while using the sudo command on my Chromebook with Linux installed. For example when I try to remove my Google Chrome beta application, I tried this: sudo apt-...
3
votes
1answer
352 views

What are these three extra chars and why do they cause such a strange error? [duplicate]

Look at these two files: File 1 File 2 They look to me entirely identical, but File 1 has 41 bytes and File 2 has 44 bytes. Now, I would not care about 3 extra chars, however, I think these chars ...
1
vote
1answer
114 views

Checking for invalid date in bash script

I am checking for a valid date scrpt.bash test 2019-05-03 date -d $2 2>: 1>:; c=$? If $c is 1 then the date is invalid. If I enter 2019-05-03 I will get a 0 which is correct. If i enter 2019-...
4
votes
1answer
2k views

fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown “element blank”

Getting this error on my vps server: fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank" This is the file: https://pastebin.com/VqcSgJ9x How to fix it?
0
votes
0answers
312 views

how to make a Input/Output Error example?

I'm working on a simple game console for raspberry pi, and I want to handle some common errors like segmentation fault, arithmetic exception and input/output error (since there maybe some guys using ...
2
votes
1answer
60 views

Why does trap ERR behaviour differ over bash versions 3 and 4?

Background Execute the following code in bash 3, 4 and 5 respectively, and you will get differing results. (function handle_error () { echo ERROR; }; trap handle_error ERR; (exit 1)) Imagine that (...
0
votes
1answer
58 views

clang: error: no such file or directory: '_REENTRANT'

I am trying to install UDUNITS-2 package for the graphical visual browser: ncview. I need to understand the following error message: clang: error: no such file or directory: '_REENTRANT' A similar ...
0
votes
0answers
24 views

How can i check for errors of the nemo file manager?

Are there any terminal commands one can use to check if the nemo file manager (linux mint 19.1 cinnamon) is working properly? Asking, since i tend to get some error messages every now and then, ...
2
votes
1answer
125 views

Failing on errors inside a function which is called on the left-hand-side of an && expression

I am working on a Bash script with several functions. I would like to exit the script if any commands return an nonzero exit code, unless in a context where that code is being explicitly handled (such ...
0
votes
1answer
353 views

How to run Ansible playbooks only if there are no problems in the playbook?

I have learned of the command ansible-playbook example.yml --check which can tell me if something in my playbook is problematic (as far as Ansible can recognize). I think I should combine this ...
6
votes
3answers
825 views

How can I output a command to a file, without getting a blank file on error?

I'm trying to run a command, write that to a file, and then I'm using that file for something else. The gist of what I need is: myAPICommand.exe parameters > myFile.txt The problem is that ...
0
votes
4answers
73 views

How to debug my script?

This script name is hello for i in $(ls $*);do x=$(echo $(basename $i".md")); pandoc $i -t "latex" -o $x.pdf; done When I write this $ ./hello *bye.md This error ls: cannot access 'test': ...
1
vote
0answers
553 views

Error adding symbols: DSO missing from command line while compiling Ogre Meshy

Yes I read many questions for ex. this and this and this and this but nothing works for me. So basicaly Im trying to compile Ogre Meshy but Im getting an error [100%] Linking CXX executable bin/...
1
vote
0answers
872 views

Yum not found on Centos 7 “ No module named yum”

I recently installed CentOS 7 but have run into an issue with yum. I get the following error: There was a problem importing one of the Python modules required to run yum. The error leading to this ...
15
votes
7answers
2k views

How can I check if a file can be created or truncated/overwritten in bash?

The user calls my script with a file path that will be either be created or overwritten at some point in the script, like foo.sh file.txt or foo.sh dir/file.txt. The create-or-overwrite behavior is ...
-3
votes
1answer
2k views

Can not download from an HTTPS site (ssl) with wget?

I know my version of wget is very old, but I can't get a download to work with it, # wget https://github.com/radare/radare2/archive/master.zip --2018-11-05 00:07:51-- https://github.com/radare/...
2
votes
0answers
323 views

wget a zip file from GitHub, OpenSSL error [closed]

$ wget -O sindresorhus-is-online-master.zip https://github.com/sindresorhus/is-online/archive/master.zip --2018-11-03 13:48:20-- https://github.com/sindresorhus/is-online/archive/master.zip Resolving ...
0
votes
1answer
77 views

get an error typeset: not found when i launch my script by crontab?

I use this portion of code to set default values in my config on my script.sh # Copyright (c) 2015 # Licence MIT ( http://choosealicense.com/licenses/mit/ ). #!/bin/sh typeset -A config # init ...
1
vote
1answer
78 views

Shell script error to extract file data

I have attempted to write a shell script and it is giving an error which I cannot understand. The script goes like this: #!/bin/bash while read id do cat demuxR1/$id.barcode.in.R1.R1.fastq demuxR2/$...
0
votes
1answer
385 views

tar returns error but still unpacks file even though “tar --no-ignore-command-error -xvzf file.tar.gz” is used

I have a corrupted file called file.tar.gz and I want to the extraction of it to fail. I used tar --no-ignore-command-error -xvzf file.tar.gz but it still extracting the files, and ignoring the errors:...
0
votes
1answer
25 views

Slackbuild script with “set -e” exit..at no error!

With this slackbuild: #!/bin/sh PRGNAM=libnfsidmap VERSION=${VERSION:-0.25} BUILD=${BUILD:-3} TAG=${TAG:-_mg} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; ...
1
vote
1answer
3k views

What exactly does “Illegal instruction (core dumped)” mean? [duplicate]

I see a lot of solutions to resolving the problem exemplified by Illegal instruction (core dumped) But, I'm wondering what exactly that means? What generates that error, and what's the root cause ...
0
votes
1answer
77 views

The /bin/ prefix to kill command is getting rid of the error message

I have Debian Stretch.. I thought that a regular user could kill root process as root. I was using the command /bin/kill 10733 as the user. There wasn't any error message. Then, I typed out the ...
1
vote
1answer
542 views

Makefile: Copy using make variables --> error; Not so without variables!

In the following makefile InputLocation:=./Test OutputLocation:=$(InputLocation)/Output Input:=$(wildcard $(InputLocation)/*.md) Output:=$(patsubst $(InputLocation)/%, $(OutputLocation)/%, $(Input:...
1
vote
0answers
206 views

I am getting this errror when trying to install the newest version of Python 3. Any ideas on how to fix it?

checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for python3.7... no checking for python3... python3 checking for --enable-universalsdk... no ...
4
votes
1answer
303 views

Weird problem with Dwarf Fortress install

Here's the thing. I'm running Mint 19, relatively fresh install. I heard a lot of hype about Dwarf Fortress, and installed it once; then, needing to leave in a hurry, closed it with Control-C. Ever ...
1
vote
0answers
53 views

Scribbleton doesn't run on Linux Mint 19

I am trying to install and run Scribbleton on Linux Mint 19, but when I do ./run_scribbleton.sh nothing happens. Talking to the support, they asked me to modify the run_scribbleton.sh script to print ...
1
vote
0answers
56 views

Ubuntu 17.10 unmet dependencies error and unable to open apps including terminal [closed]

Okay, I have had this error for probably over 6 months and finally after being so lazy to do so am trying to get an answer to fix my problem. One day, doing absolutely nothing to screw up my Ubuntu, ...
0
votes
1answer
308 views

error: duplicated database entry using pacman [duplicate]

I issue $ pacman -Su :: Starting full system upgrade... error: duplicated database entry 'python2-cairo' there is nothing to do So I have a look at /var/lib/pacman/local $ ls /var/lib/pacman/local/...
-2
votes
1answer
139 views

Using the ping command on my VirtualBox Debian System returns no route but I can still connect to websites

For further clarification, I'm using a bridged adapter on VirtualBox and it's set to allow VMs (it is also using the correct adapter). This is what the terminal responds with after running the ...
1
vote
1answer
134 views

How to silently handle the “bash: /xyz: Is a directory” error in bash shell?

In zsh, executing the directory path will cd into it. I want to make bash shell to behave the same. The idea is to check and see if the error is bash: /xyz: Is a directory and cd into '/xyz' and ...
2
votes
1answer
94 views

Script error handling: need to report segfault in script run by ssh

I wrote a cron job, which uses ssh to run a script on a server. I just tried running the script, and now I am unhappy. client# ssh server.local /usr/local/bin/script client# server# /usr/local/bin/...
-2
votes
1answer
227 views

How to verify that the installation of Apache Server works?

Debian 9.5 Apache HTTP Server 2.4.34 (httpd) After installing Apache from the official page with sudo make install, I want to check that the installation works starting the server: $ sudo /usr/local/...
2
votes
1answer
248 views

Getting error code of the first command in pipe in ash

I use wget to download a big file to two FIFOs like that: wget <wget-args> -O - | tee -a "$fifo1" >> "$fifo2" I want to retrieve the error code of wget on failure. set -o pipefail ...
0
votes
2answers
66 views

How do I make this script output: “Error connecting to Mom via SSH” when connection is down?

Intention I am in the middle of writing a little shell script (POSIX, except for the system_beep()). The script, which runs in Cygwin, should find out, if my mother's laptop is closed or not and ...
1
vote
0answers
1k views

“unexpected EOF while looking for matching `)'” - when trying autocomplete [duplicate]

Whenever I start typing in a command which uses $( ) expansion, and I press tab while typing in the inner command, I get an error: unexpected EOF while looking for matching `)' Thus, for example, I ...
1
vote
0answers
66 views

Why does trying to open a sub-shell in a for loop give a syntax error at done?

If I execute this bash script: #!/bin/bash j=0 for(( i=1;i<(j);i++ )) do echo j done I get: ./test: line 6: syntax error near unexpected token `newline' ./test: line 6: `done' I know that the ...
0
votes
2answers
284 views

How to make systemd not hang (unresponsive system), but provide emergency shell?

I am not very familiar with systemd. The answer I seek with this question is: How is it possible to make systemd react to problems with "dropping the user into an emergency shell of sorts", instead ...
1
vote
1answer
55 views

Does we need a delay time between command in Linux ?

I have a script process.csh for processing many files through many steps which the above output is the input of below command. Do I need to insert a delay between commands to be sure there is no ...