error uploading to sketch

i was uploading my program to the arduino board and got the following error message
Arduino: 1.8.6 Hourly Build 2018/07/20 10:33 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 5646 bytes (2%) of program storage space. Maximum is 253952 bytes.
Global variables use 393 bytes (4%) of dynamic memory, leaving 7799 bytes for local variables. Maximum is 8192 bytes.

avrdude: stk500v2_setparm(): failed to set parameter 0x9e
avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
An error occurred while uploading the sketch
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab: C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab: C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

i dont understand what it is supposed to mean. please help

Sketch uses 5646 bytes (2%) of program storage space. Maximum is 253952 bytes.
Global variables use 393 bytes (4%) of dynamic memory, leaving 7799 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_setparm(): failed to set parameter 0x9e
avrdude: stk500v2_command(): unknown status 0xc8

That means that the sketch compiled, but the IDE can't connect via the serial port. Have you set the correct port in the Tools, Port menu?

i was trying to upload my code to arduino mega and got this error message. please help me.
Arduino: 1.8.6 Hourly Build 2018/07/20 10:33 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 4898 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 383 bytes (4%) of dynamic memory, leaving 7809 bytes for local variables. Maximum is 8192 bytes.

avrdude: stk500v2_setparm(): failed to set parameter 0x9e
avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
An error occurred while uploading the sketch
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab: C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab: C:\Users\Lenovo\Documents\Arduino\libraries\Led_Project_ATL_lab

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This usually indicates that the connections is either bad or that you've chosen the wrong serial port for upload.

Are you using an Arduino Mega or an Arduino Mega2560?

@Faruthecoder, please do not cross-post. Threads merged.