We consider the safe navigation of robots in unknown environments using data from sensory devices. The control barrier function (CBF) is one of the promising approaches to enforcing safety in robot navigation and the recent progress on learning-based approaches realizes online synthesis of CBF-based safe controllers with sensor measurements. However, the learned CBF candidates in these works cannot be generalized to different environments and the re-synthesis is necessary when changes in the environment occur. With this observation, this paper attempts to develop a method that can effectively use past data in different environments to quickly learn the CBF candidate in the current setting by leveraging the currently developed Bayesian meta-learning framework. Our method realizes data-efficient online learning as shown in the simulation and provides safety guarantees on the resulting controller.