When is the popup occurring? While in Safari or just randomly on the screen?
See if anything here helps.
i am getting a message popup when I open safari that apple has detected 2 malware virises on my macbook2 air
If Safari, Safari/Preferences/Advanced - enable the Develop menu, then go there and Empty Caches. Quit/reopen Safari and test. Then try Safari/History/Show History and delete all history items. Quit/reopen Safari and test. You can also try try Safari/Clear History…. The down side is it clears all cookies. Doing this may cause some sites to no longer recognize your computer as one that has visited the web site. Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J. When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Select Library/Caches/com.apple.Safari/Cache.db and move it to the trash.
Go to Safari Preferences/Extensions and turn all extensions off. Quit/reopen Safari and test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.