In many cases, the cause of pericarditis is not known. Viral infections are a common cause of pericarditis. Bacterial, fungal and other infections also can cause pericarditis.