So, according to Paul in 2 Timothy 3:16, all Scripture is given by inspiration of God. By the way, the Greek text literally says "God-breathed". But what does it mean for something to be inspired by God. Many claim that because Scripture is inspired by God, that it must therefore be inerrant because God would not inspire error. Which, I completely agree that God would not inspire error. But what does it mean to "inspire", anyways?
Side note: The word translated as "Scripture" in this verse is the Greek word "graphe", which literally means "writing" or "document". It's where we get the word "graph" from. A purely literal translation of this verse would read "All writings are God-breathed". Obviously, context needs to be taken into consideration when determining which writings Paul is talking about. Also, when he wrote that, the New Testament didn't exist, and most of the writings in the New Testament either (a) didn't exist yet, or (b) weren't widely known about.
Anyways, back to the topic at hand. What does it mean to inspire something? Well, I looked it up in both the Merriam-Webster dictionary, and Dictionary.com. And inspiration has to do mainly with motivation. And it has nothing to do with guidance except, for some reason, when it comes to divine inspiration. Interesting exception to the rule. But the inclusion of guidance exclusively when it comes to divine inspiration seems rather arbitrary, so I'm going to reject the definition of guidance and stick with motivation. That is not to say that God did not give any guidance. It just means that guidance and inspiration are two separate things.
So, if a writing is "inspired by God", then that means God motivated someone to produce said writing. Does that mean that the resulting document is going to be inerrant? Absolutely not. Also, simply inspiring someone to produce a document has nothing to do with whether the person is inspired to write truth. The question is: Would God inspire someone who prioritizes an agenda over truth? Certainly not! God would inspire a God-fearing person to produce the document. And the faith of the God-fearing person would inspire truth!
To put this another way, God motivates a God-fearing person to produce a document, and the faith of that person is what motivates that person to be truthful in the document that he/she writes. Such a person will diligently investigate the matter in which he or she is writing about to make sure that everything in the document that he or she is producing is correct. In other words, God doesn't have to inspire truth. The faith of the God-fearing person he inspires will do that for him. Now does this mean that the resulting work will be inerrant? No. It can be inerrant, but that is not guaranteed for the simple fact that humans still make mistakes. But the fact that the person's faith inspires truth will make the document as close to perfect as humanly possible.
In order for to get inerrancy in a document, God has to do more than just inspire the right person. He has to tell that person what to write down, or guide that person concerning the truth. Some prime examples of the former would be the five books of Moses, where Moses wrote everything that God commanded. And we can't forget about the books of the prophets, who were required to speak EXACTLY what God spoke to them. And of course all of the teachings of Jesus are inerrant, for Jesus is God in the flesh! Some examples of God guiding the person the truth is found in the book of Psalms. For example, Psalm 8:8, which mentions the "paths of the seas". Today, we call these paths "ocean currents". And the example that Jesus gave is Psalm 82:6. By the way, Proverbs 1:7 and 9:10 state that the fear of Yahweh is the beginning of knowledge. The one who fears God is the one God guides in matters of truth. Everyone else is on their own!
Does everything in the Bible need to be the literal word of God in order for it to be the primary (or only) authority in our lives? No. Only the parts that claim to be the literal word of God need to be that. Does the entire Bible need to be inerrant in order to be the primary (or only) authority in our lives? No. But the parts that claim to be the literal word of God does have to be without error. Otherwise, Deuteronomy 18 applies. Anything that claims to be the literal word of God, yet gets so much as one item wrong, is not the word of God.