-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:

Zanna
  • 72,312
K.Wanter
  • 958

1 Answers1

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.

karel
  • 122,292
  • 133
  • 301
  • 332