Since Olympic squats are part of the Rookie Strength Routine and it's important to know how to squat safely. In order to perform the exercise safely you will need spotters and/or a squat rack with safety pins. However, that's not always possible and sometimes you may find yourself in an empty gym without someone to spot you. Here is what you can do.
Use Common Sense
I've failed a lot of squats over the years and probably in 99% of the cases I knew that I will fail the rep even before starting it. In other words if your program calls for 6 reps and you end up doing 4 knowing that the next two are close to impossible simply STOP. Training to failure is stressful on the CNS and does not have many benefits, if any.
Note: This principle applies even if you have all the spotters in the world. Missed reps cause CNS fatigue more than anything else and are not needed for progress.
Dump the bar
If you are training with bumper plates (plates used by Olympic weightlifters) you can simply dump the bar by taking your hands off and jumping forward. FAST. It's not easy but it's easier than it sounds. This method is used by Olympic weightlifters every day. They rarely use spotters and dump the bar during front or back squat misses.
This method however is recommended only if you have bumper plates and you are doing upright high-bar squats. The low-bar squat is harder to dump because of the increase forward lean. Dumping a heavy bar over your head is dangerous because it may hit you in the back of the head and seriously hurt your spine. Don't do it.
How To Dump The Bar
Use a Squat Cage/Power Rack
The power rack is the safest possible way to squat alone. Nothing beats it. Set the safety pins so that at the bottom of the squat they are 1-2 inches below the bar. You don't want to be hitting them every time you go down but you also don't want them to be too low.
If you can't complete a rep simply lower the bar and let it carefully on the safety pins. Try it a few times with a light weight. Also if you are going to use this method don't dump the bar when you are too far away from the safety pins - the bar will be damaged instantly if it falls on the safety pins. Simply lower yourself under control.
Spotters and squats
You can also use spotters if they are available. You need two spotters when you squat. If you have just one spotter your almost on your own and all he/she can do is lift the bar slightly when you are stuck. Many people will find having someone behind them distracting and even motion restricting if the person is not experienced. Another problem with squat spotters is when one of them lifts the bar and the other one does not. That way they are twisting you around and may injure your lower back. If you have access to a cage or you are confident with dumping the weight it may be even safer to squat this way instead of using stupid spotters.