Errors on uploading code to Board

i am trying to uplaod my sketch to arduino nano board .
i am getting these following errors again and again.

i suggest you see my error before reading my code.
because i seemed errors not related to my sketch.

errors are-----------------------------------------------------------

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.43 (Windows 7), Board: "Arduino Nano w/ ATmega328"
Binary sketch size: 12,024 bytes (of a 30,720 byte maximum)


avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: stk500_cmd(): protocol error
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.43 (Windows 7), Board: "Arduino Nano w/ ATmega328"
C:\Program Files\Arduino\hardware\tools\avr\bin\avr-ar: unable to rename 'core.a'; reason: Permission denied
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.43 (Windows 7), Board: "Arduino Nano w/ ATmega328"
Binary sketch size: 12,024 bytes (of a 30,720 byte maximum)

avrdude: loadaddr(): (b) protocol error, expect=0x14, resp=0xfc

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: stk500_cmd(): protocol error
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.43 (Windows 7), Board: "Arduino Nano w/ ATmega328"
Binary sketch size: 12,024 bytes (of a 30,720 byte maximum)


avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x10, resp=0xfc
avrdude: error reading signature data for part "ATMEGA328P", rc=-3
avrdude: error reading signature data, rc=-1
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.43 (Windows 7), Board: "Arduino Nano w/ ATmega328"
Binary sketch size: 12,024 bytes (of a 30,720 byte maximum)


avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: stk500_cmd(): protocol error

my code is

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
IRsend irsend;

 #define CH_UP      0xFE9867  //  Enter your code instead of "4FB32CD"
 #define CH_DOWN    0xFE18E7
 #define UP         0xFE30CF
 #define DOWN       0xFEB04F  //  Enter your code instead of "4FB32CD"
 #define RED        0xFECA35
 #define BLUE       0xFE0AF5
 #define GREEN      0xFE4AB5
 #define YELLOW     0xFE8A75

void setup() {
  pinMode(4, INPUT_PULLUP);
  pinMode(5, OUTPUT);   // Green
  pinMode(6, OUTPUT);   // Red
  pinMode(12, OUTPUT);   // 
  pinMode(13, OUTPUT);   // 
  
  irrecv.enableIRIn();
  Serial.begin(9600);
  
  if ( digitalRead(4) == LOW)
              {
     Serial.println(" Button 2 is pressed"); 
     Serial.println(" Green ---  Morning Play"); 
     digitalWrite(5, HIGH);
     digitalWrite(6, LOW);
              }
              else {
     Serial.println(" Button 2 is  not  pressed"); 
     Serial.println(" Red  --- evening play"); 
     digitalWrite(5, LOW);
     digitalWrite(6, HIGH);
                               //  Lcd Power ON
     Chan_1 ();
              }
            }

void loop() {
  if (irrecv.decode(&results))
  {
       
    if (results.value == YELLOW || results.value == BLUE)     //                              
    {
      NEXT (); 
    Serial.println("next");  
    }
    if (results.value == RED || results.value == GREEN)     //                              
    {
     BACK ();     //                        BACK 
     Serial.println("back"); 
    }
    
    if (results.value == UP  ||  results.value == CH_UP)     //                              
    {
     for (int i=0; i<5; i++)  {
     NEXT ();     //                        NEXT x5
     Serial.println("next"); 
     }
    }
    
       if (results.value == DOWN || results.value == CH_DOWN)     //                              
    {
     for (int i=0; i<5; i++)  {
     BACK ();     //                        NEXT x5
     Serial.println("back"); 
     }
    }
   
    irrecv.resume();
    

  }    
}

void NEXT () {
       irsend.sendNEC(0xFF708F, 32);   // Dish  Channal Up
       
       digitalWrite (5,HIGH);
       delay (500);
       digitalWrite (5,LOW);
           }
void BACK () {
  
       irsend.sendNEC(0xFF58A7, 32);  // Dish Channnal Down
       digitalWrite (6,HIGH);
       delay (500);
       digitalWrite (6,LOW);
           }
void Chan_1 () {
  
       irsend.sendNEC(0xFFB04F, 32);  // Dish Channnal Number 1
           }
void Morning ()  {
         Serial.println("Morning  flie Select And Played");

           }

how can i solve it please till me step-by-step help
thank you,

I don't know that it would cause this error, but you're using a version of the Arduino IDE (and thus a version of AVRDUDE) that's many years out of date. Try updating to Arduino IDE 1.8.13 and see if the error still ocurrs. You can download the IDE here:

check if the port is correct and press reset button on arduino

errors are coming even after install Arduino 1.8.13

i got following error on uploading simple example Blinking.ino

error

Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P"

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfe

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfe

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xfe



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

charnjit:

Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P"

Select Tools > Processor > ATmega328P (Old Bootloader) and then try uploading again.