I have just installed Ubuntu 22.04 and tried to install Sagemath from
https://sagemanifolds.obspm.fr/install_ubuntu.html
with the following commands: sudo apt install sagemath-jupyter
Unfortunately a message with writing I have unmet dependencies appeared:
sudo apt-get install sagemath
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-rpy2 : Depends: python3 (< 3.9) but 3.10.6-1~22.04 is to be installed
E: Unable to correct problems, you have held broken packages.
The command sudo apt update gives the following message in the end that might be helpful:
W: https://cloud.r-project.org/bin/linux/ubuntu/focal-cran40/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
My python version is python 3.10.6, yet I have installed an older version of python 3.7 as it is written on the above message. When I tried to install again the same message occured.
Furthermore, I tried to build Sagemath 9.7 from source as in the above site but my laptop stacks at the final command
MAKE="make -j8" make
at some point and I forced to shut it down. Could you please help me?
synaptic
package manager in your system is handy when you encounter problems like these. Try the commands as described in this article: https://www.makeuseof.com/how-to-find-and-fix-broken-packages-on-linux/#how-to-find-and-fix-broken-packages – rusty Jan 16 '23 at 07:30sagemath-jupyter
has no such requirement forpython3-rpy2
thus the message you're getting relates to either badly added sources (read yoursudo apt update
messages) or other packages you've installed. The packagepython3-rpy2
is not found in Ubuntu repositories, thus is not required for any Ubuntu package likesagemath-jupyter
found in Ubuntu repositories (if requirements don't exist, it won't build). Your error relates to details you've not pasted. You could explore usingapt-cache policy python3-rpy2
to see where you got it, but it's not Ubuntu – guiverc Jan 16 '23 at 08:40