With the development of 5G wireless network and beyond, the wireless carrier frequency will definitely reach millimeter-wave (mm-wave) and even terahertz (THz). As one of the key elements in wireless networks, the local oscillator (LO) needs to operate at mm-wave and THz band with lower phase noise, which becomes a major challenge for commercial LOs. In this article, we investigate the recent developments of the electronic integrated circuit (EIC) oscillator and the optoelectronic oscillator (OEO), and especially investigate the prospect of OEO serving as a qualified LO in the 5G wireless network and beyond. Both the EIC oscillators and OEOs are investigated, including their basic theories of operation, representative techniques and some milestones in applications. Then, we compare the performances between the EIC oscillators and the OEOs in terms of frequency accuracy, phase noise, power consumption and cost. After describing the specific requirements of LO based on the standard of 5G and 6G wireless communication systems, we introduce an injection-locked OEO architecture which can be implemented to distribute and synchronize LOs. The OEO has better phase noise performance at high frequency, which is greatly desired for LO in 5G wireless network and beyond. Besides, the OEO provides an easy and low-loss method to distribute and synchronize mm-wave and THz LOs. Thanks to photonic integrated circuit development, the power consumption and cost