Ubiquitous communication is an emergent feature of the future sixth generation of mobile communication (6G) networks. One of the main challenges of this upcoming mobile network is providing broadband communication wherever connectivity is necessary, including rural areas. Up to now, all previous generations of mobile networks have not satisfactorily accomplished this task, and the high cost of deploying and maintaining complex communication infrastructure in remote areas is one of the main reasons. The centralized radio access network might play an important role in overcoming it, since it enables all baseband centralization in a central office (CO), simplifying network deployment and reducing operating/maintenance costs. Additionally, in this scenario, the radio over fiber (RoF) system might be used for transporting analog signals from the CO to a simplified remote base station, composed only of an optical detector and radio-frequency front-end. However, the Mach–Zehnder modulator and power amplifier, commonly employed in RoF systems, introduce undesired nonlinear effects that can severely degrade overall system performance and prohibitively increase the out-of-band emission. We investigate the use of machine learning (ML) algorithms applied to the linearization of an electrical-amplified RoF system. Particularly, a memory recurrent neural network (RNN) linearization is proposed and compared with a memoryless multilayer perceptron linearization. The root mean square error vector magnitude, normalized mean square error, and adjacent channel leakage ratio metrics have been calculated to evaluate the performance of our ML-based approach. Numerical results demonstrate promising linearization performance when the RNN memory depth is equal to or higher than the amplified-RoF system memory depth.