Rviz_common files not found when launching rviz2

Okay so I am in the beginning of the broadcasting section number 3.2. When I source in the terminal the following is output on the terminal:

ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.

Then when I run rviz2 the following error is output :

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[INFO] [1688734375.741719691] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1688734375.742244516] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[INFO] [1688734375.841294184] [rviz2]: Stereo is NOT SUPPORTED
rviz2: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)

This is the previous solution:
https://get-help.robotigniteacademy.com/t/rviz-common-not-found-while-launching-rviz2/23205