Q: P0171 how do i fix? on 2000 Subaru Impreza Outback

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
My car is pulling a po171 code. I know it means the car is running to lean but dont know how to solve this. any help?
(1) Answer
Understanding the background behind a lean code is the key to the repair. Essentially the computer can no longer compesate for a improper fuel mixture. The lean code can be set by a number of different components. The most common is a vacuum leak at a hose,gasket or even an oil cap that is not sealed properly. The other items would be a leak in the air intake system between the air cleaner and engine.Lastly a faulty sensor such as the Mass Air Flow sesnor or Oxygen Sensor.