Compile problems

A while ago I changed my linux OS from Ubuntu to Mint, and now I have a problem with compiling any sketches
All I get is Error compiling for board Arduino Uno
And this is the error message for when I try to compile the Strandtest sketch:

/home/rob/Downloads/arduino-1.8.19/arduino-builder -dump-prefs -logger=machine -hardware /home/rob/Downloads/arduino-1.8.19/hardware -tools /home/rob/Downloads/arduino-1.8.19/tools-builder -tools /home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -built-in-libraries /home/rob/Downloads/arduino-1.8.19/libraries -libraries /home/rob/sketchbook/libraries -fqbn=arduino:avr:uno -ide-version=10819 -build-path /tmp/arduino_build_724364 -warnings=default -build-cache /tmp/arduino_cache_893106 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/rob/Downloads/arduino-1.8.19/hardware/tools/avr -verbose /home/rob/Downloads/arduino-1.8.19/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino

loading libs from /home/rob/Downloads/arduino-1.8.19/libraries: loading library from /home/rob/Downloads/arduino-1.8.19/libraries/HC-SR04_Distance: loading library.properties: Error reading file: Error parsing data at line 0: Invalid line format, should be 'key=value'

Error compiling for board Arduino Uno.

It says it is trying to load the HC-SR04 library, but it should be the Adafruit neopixel library which is in the said sketch

Something has got screwed but what and how do I fix it.
Thanks

The obvious thing is to complete uninstall the IDE and re-install it.
If there are any third party libraries you are using, please make sure that they are in a sub-folder of your sketchbook folder, and make sure to select the sketchbook folder as such in the IDE preferences.
If that doesn't help, please post your sketch.

I uninstalled arduino IDE, then re installed it. I then made sure the sketchbook folder was set in preferences.
Now I am getting error messages with all my sketches during the setup of the new install of Arduino IDE. It says they have bad names???, and can't be used.
How can that happen, as I have used them previously

Bad names means that there is something in the name that the IDE doesn't accept, usually it is a ' ' (space) that is causing that. The folder that the sketch is in as well as the ino file can not have any spaces in the name.

Thanks but there are no spaces in the names as there is an underline between 2 words
IE Adafruit_NeoPixel-master, or AdafruitSwirlRGBLeds

Forget about old sketches for a while. Just do a new sketch all null... just an empty setup() and empty loop(). Does that compile for UNO?

In the names no, but in the folders?
Do you use folders or filenames with national alphabets characters?

The names of the sketches also have underlines between words or numbers, and they have been like that since I first downloaded them a year or more since.I use folders with the name of the sketch inside the folder and I use ordanairy English characters like abc and 123

anywhere in the folder lineage ?

Please test with empty sketch as suggested in post 6
Empty sketch is:

void setup() {}
void loop() {}

Yes , an empty sketch compiles ok.
So it seems like all my sketches are useless now.
Thanks

no, I think this means that your sketchbook and libraries folders has wrong paths

Ok, so how do I correct that. The sketchbook path is set in preferences, but where do I set the path for the libraries

Should the libraries path be Arduino\libraies, as mine have been Arduino\sketchbook\libraries

I have just downloaded the latest version of fastLED, moved the zip file to my Arduino\libraries folder then tried to insert into a sketch.
I got an error message saying the zip file library can't be used because it has a bad name. How can that be

Please show error message in full
And show your code which produced that message

I have moved all my sketches and library files onto a USB stick , and moving them back 1 by 1 after downloading the latest library file. In this case it is the DHT library.
I have used this sketch about 2 years ago without any problems, and now it won't compile due to the error saying DHT.h is missing

include <DHT.h>
#include <Wire.h>
#include <hd44780.h>                       // main hd44780 header
#include <hd44780ioClass/hd44780_I2Cexp.h> // i2c expander i/o class header
   
#define DHTPin 7
#define DHTTYPE DHT22

hd44780_I2Cexp lcd; // declare lcd object: auto locate & config exapander chip
DHT dht; 

const int LCD_COLS = 16;
const int LCD_ROWS = 2;

// Define variables

float hum;  //Stores humidity value
float temp; //Stores temperature value

void setup()
{
  
  
   dht.setup(DHTPin);
   lcd.begin(LCD_COLS, LCD_ROWS);
   //lcd.begin();
}

void loop()
{
  delay(2000);  // Delay so sensor can stabalize

  float temp = dht.getTemperature();
  float humi = dht.getHumidity();
   
   lcd.setCursor(0, 0);
   lcd.print("Temp: ");
   lcd.print(temp);
   lcd.print(" C");
   lcd.setCursor(0, 1);
   lcd.print("Humi: ");
   lcd.print(humi);
   lcd.print(" %");
   //delay(2000);
}

usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/Wire /tmp/build159064429951069768.tmp/Work_Temp_Humidity.cpp -o /tmp/build159064429951069768.tmp/Work_Temp_Humidity.cpp.o 
Work_Temp_Humidity.ino:1:17: fatal error: DHT.h: No such file or directory
compilation terminated.

it's mean that you installed the library to the wrong place, as is I and others said to you many times.

I think that without seeing all your preferences and environments I can hardly help you. Try to find someone who knows near you.

I can only recommend doing a complete reinstallation of the arduino IDE, preferably from a different user on the system.
Good luck

Ok, so where should I have installed the library. As I said above my library files are \Arduino\Sketchbook\libraries.
Should they be Arduino\Libraries

In the preference I have Show verbose output during compilation checked
Verify code after upload checked
Check for updates at startup checked
update sketch files to new extension on save (pde -> .ino) checked

What about my environment, what should I be looking for specifically.

I uninstalled my existing version 1.8.9? and installed version 2.1.0.5 yesterday

thanks

No \Arduino\Sketchbook\libraries. is correct for 3rd party libraries,
I don't know how this is with Linux, but on windows your sketchbook should not be in the program files folder (or subfolders) since those are 'write-protected' to some extend.