-1

I am new to Linux and although I've been Using Ubuntu for a while I'm still not familiar with the error messages generated by the shell commands.

For example, when installing some driver/software or configuring development environments (like caffe with GPU surport on Linux), we often inevitably encounter many different error messages.

Usually I just copy the error and search online using that error to find solutions, and sometimes that works, but I don't always gain a deep understanding of the error message.

Are there any materials or resources to understand Linux shell error messages?

I have viewed the following questions, but did not get enough info:

2
  • I am not so vested in shell scripting but i think each error comes from the command run in the shell in addition to the shell error Nov 29, 2017 at 5:41
  • 1
    Note that although there's standard Linux exit codes to signify particular errors ( see unix.stackexchange.com/q/326766/85039 ) many applications have their own specific errors, so there's not much choice between reading documentation for application or googling. Oct 7, 2018 at 3:19

1 Answer 1

3

Messages that are shown in the terminal and log files contain a lot of useful information, but it is sometimes hard to search anywhere on the web for these messages because they are frequently very specific. For an example I will use the following error message:

/usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc:30: error: invalid string constant "murrine-scrollbar", expected valid string constant

This error message refers to a file named mate-panel.rc. The string :30 refers to line 30 which happens to be the last line in mate-panel.rc.

If you can't find the specific error message try breaking it up into smaller parts and searching for part of the error message.

  • Instead of searching for /usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc:30 search for /usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc which is the path to the mate-panel.rc file.

  • Or search for the mate-panel.rc file by searching for only its name, mate-panel.rc.

  • Or search for something else in the same error message, for example the error instead of the path to mate-panel.rc:

    error: invalid string constant "murrine-scrollbar", expected valid string constant  
    
  • If that doesn't work search for similar errors. "murrine-scrollbar" is an invalid string constant in the above error message. Try searching for the error message as "boilerplate" or "pro forma" text without including the specific string constant:

    error: invalid string constant expected valid string constant  
    

    Now the error message is so general that you may get too many useless search results. Try limiting the search results. Because the path /usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc exists only in Ubuntu 17.10, try limiting your search results by adding the search phrase "Ubuntu 17.10" or "17.10" to your search query.

3
  • 1
    Thanks very much for the detailed reply! Thats what I mean, on the other hand, I find there is lots of different type of error messages that may be prompted from the shell, like this one, I'm wondering if there is some references that may concluded possibly all kinds of different type of error, so that we learn quicker although maybe we can just experienced with many different errors then gather different knowledge.
    – K.Wanter
    Nov 29, 2017 at 8:43
  • 1
    WARNING: Logging before InitGoogleLogging() is written to STDERR W1129 16:39:02.310186 4013 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface W1129 16:39:02.310226 4013 _caffe.cpp:140] Use this instead (with the named "weights" parameter): W1129 16:39:02.310233 4013 _caffe.cpp:142] Net('/usr/local/fast-rcnn/models/VGG16/test.prototxt', 1, weights='/usr/local/fast-rcnn/data/fast_rcnn_models/vgg16_fast_rcnn_iter_40000.caffemodel')
    – K.Wanter
    Nov 29, 2017 at 8:46
  • There is a caffe tag at Stack Overflow. Stack Overflow is the go to website for questions about programming, but the Stack Overflow is so big that it often takes a long time to find the answer that you are looking for. After searching for hours on Stack Overflow to solve a problem with Java code I finally found the answer that I was looking for and then years later I needed to find the same answer again and I had to search for hours on Stack Overflow to find the same answer a second time.
    – karel
    Nov 29, 2017 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .