how to remove this error "ERROR 152: Port on instance does not exist in entity declaration for instance"?
Use of the words "Port" and "Entity" suggests that you are working in the VHDL language, perhaps your schematic editor is a tool that allows the visual creation of VHDL designs.

The actual meaning of the message is clear : you are trying to connect a signal to a pin that doesn't exist. For example, take this AND gate

entity AND2 is
   port (A,B : in std_logic;
         O   : out std_logic);
end entity;


If you try connecting 3 inputs (A,B,C) and one output to it, this will fail with a similar error message about port C.

Now the specific cause in your environment is not so clear to anyone who doesn't use that environment.

It might be that you have created a schematic symbol for a 3-input AND gate







simulate this circuit &ndash; Schematic created using CircuitLab

and as part of that symbol, associated it with a VHDL entity called "AND2" which of course represents a 2-input AND gate.

Now either you need to find the correct VHDL entity (presumably called "AND3") or delete the extra input pin (and make sure the other two are labelled "A" and "B"). 

But you must end up with a schematic symbol and a VHDL entity that match. i.e. both the graphic view and the VHDL textual view must describe teh same thing.

If you don't know how to do that, you need to find and study tutorial material for the specific tools you are using.