The King was wicked and didn't want to repent and follow God with his whole heart.He kept blaming the prophet since he was an easier target.The famine wouldn't have happened if he had obeyed God(we are all called to be obedient to God and His Messiah).
"Joram son of Ahab became king of Israel in Samaria in the eighteenth year of Jehoshaphat king of Judah, and he reigned twelve years.He did evil in the eyes of the Lord" 2 King 3
"While Elisha was still speaking with them, the messenger came down to him. And the king said, “This calamity is from the LORD. Why should I wait for the LORD any longer?” 2 king 6:33
Now Elisha had said to the woman whose son he had restored to life, “Go away with your family and stay for a while wherever you can, because the Lord has decreed a famine in the land that will last seven years. 2 King 8