Added:
Based on the added comment that
The purpose of the question is to determine whether solar panels can be made after fossil fuels are widely unavailable and long-distance supply chains are extremely expensive or unavailable.
I won't address the assumptions made re unavailability of supply chain, and will just assume that it is true in this case.
Numerous semiconductor material exist. Many of these are suitable to some extent for making "solar cells" but practical considerations usually result in extremely low efficiencies - typically far far below 1%.
One material that would be available in moderate quantities s a byproduct of past applications would be Copper, and in some areas copper could be smelted locally. "Copper Oxide" (of which there are a number of forms) is a semiconductor and solar cells can be made from it. Efficiencies and power levels are usually 'pitiful' but researchers continue to improve results and it is possible that in time a product may be avail;able which is not as efficient as Silicon, but which is low enough in cost as to make the cells competitive in some cases.
Link - This 2006 paper - full version available here for free - "Heterojunction solar cell with 2% efficiency based on a Cu2O substrate" claims 2% conversion efficiency and a current output of 6.8 mA per cm^2 short circuit at about 0.6V per cell open circuit. The "fill factor" is about 50% which means that the output droops under load such that the cell makes about 50% x Voc x Isc. The 2% efficiency is about 10%- - 12% of typical top end commercial silicon cells and about 9% of the best silicon cells. That's an encouraging figure if replicable. They seem to be using some high tech fabrication gear (ion beam sputtering) but easier methods can probably be evolved.
Link - 2009 nanowire version - relevant
Link - 2013 - ORNL - the 'big boys' at play
And more.
You can produce your own "DIY" cells starting with not much more than copper metal.
Results are very poor but they do work.
Link - Make a solar cell in your kitchen
Ugly truck:
A different version of the above.
Link - A flat panel solar cell

Link - Making a PV cell - school experiment
Link - Instructables - home made solar cell step by step
__________________________________
Yes.
But saying where "locally" is would help.
Requiring 'non-fossil' mining and transport etc is a matter of economics and choice. ie you can mine by hand - and in some countries this is what is indeed often done.Doing this would not be deemed economic in almost any system. This does not mean that it should not be done - just that you need to establish what you are trying to achieve and what the values and costs are.
The most common solar panels use a sandwich of glass + bonder + silicon PV cells + bonder + backsheet. The bonder is usually "EVA" plastic which is crosslinked into long chains under temperature and pressure. EVA is a hydrocarbon product but others are possible and a non hydrocarbon alternative is possible. BUT EVA is exceptionally good at this task and in the last 50years or so no better alternative has managed to displace it. There are many challengers.
Most people buy doped silicon wafers - which have been made from silica sand using highly advanced metalurgical processes. There is no obvious reason why this whole process could not be hyrdrocarbon free (except perhaps trace chemicals used in the doping processes. but maybe not even then.
The glass used is rather special BUT any glass making process that can make an essentially flat smooth sheet would be able to make panels that worked.
The backsheet can be glass if desired.
Frames are usually aluminum but other materials could be used.
Aluminum requires immense energy levels during refining. A solar concentrator could probably be used for energy if use of aluminum was desired.\
Overall it's doable but hard and cost would be very high.
Other processes probably have no portion which absolutely must use hydrocarbons EXCEPT if they are used as dopants in the semiconductors.