As @AndrewSayer said, it has nothing to do with your dmp file. In order to connect to a database, the client (in your case, 'imp' utility) has to be able to locate the database. This means knowing the server the database is on, the port the database listener is uing, and the service name by which the listener knows the database. This information is usually (though not exclusively) found in the file 'tnsnames.ora',
A typical entry looks something like this:
PDB01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vbol83-02)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pdb01.localdomain)
)
)
Of course, the actual values will be unique to your installation.
The portion of your command line "@dbname" references a specific entry in that file. The error ORA-12154 simply means it could not find the entry you referenced. Either it could not locate a file named 'tnsnames.ora', or it found the file but could not find the referenced entry.
The file is normally located at $ORACLE_HOME/network/admin.
Did you bother googling 'ORA-12154'? If you had, you would have gotten many, many hits, possibly even my favorite: https://edstevensdba.wordpress.com/2018/09/19/troubleshooting-ora-12154/
ORA-12154 TNS:could not resolve the connect identifier specified
means thatdbname
can not be resolved to an address to point to a database.