2

I am using gnuplot and Rust for a project on my Linux Mint (cinnamon) PC. However once I try to display a picture I get:

called `Result::unwrap()` on an `Err` value: Couldn't spawn gnuplot. Make sure it is installed and available in PATH.
Cause: No such file or directory (os error 2) 

This seems ok as I haven't downloaded Gnuplot. However once i run

sudo apt install gnuplot

I get

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gnuplot-x11 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

and I have no idea what I should do now. Any help is apreciated, thanks

EDIT: I already ran

apt update

and apt policy returns

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://packages.microsoft.com/repos/code stable/main armhf Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=armhf
     origin packages.microsoft.com
 500 http://packages.microsoft.com/repos/code stable/main arm64 Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=arm64
     origin packages.microsoft.com
 500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=amd64
     origin packages.microsoft.com
 500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 500 https://mirror.init7.net/linuxmint vera/backport i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=backport,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint vera/backport amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=backport,b=amd64
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint vera/import i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=import,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint vera/import amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=import,b=amd64
     origin mirror.init7.net
 700 https://mirror.init7.net/linuxmint vera/upstream i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=upstream,b=i386
     origin mirror.init7.net
 700 https://mirror.init7.net/linuxmint vera/upstream amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=upstream,b=amd64
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint vera/main i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=main,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint vera/main amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=main,b=amd64
     origin mirror.init7.net
 500 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages
     release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 500 https://cli.github.com/packages stable/main amd64 Packages
     release o=gh,n=stable,l=gh,c=main,b=amd64
     origin cli.github.com
 500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 500 https://apt.kitware.com/ubuntu focal/main i386 Packages
     release o=ubuntu focal,a=focal,n=focal,l=ubuntu focal,c=main,b=i386
     origin apt.kitware.com
 500 https://apt.kitware.com/ubuntu focal/main amd64 Packages
     release o=ubuntu focal,a=focal,n=focal,l=ubuntu focal,c=main,b=amd64
     origin apt.kitware.com
 500 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages
     release v=18.04,o=CRAN,a=bionic-cran40,n=bionic-cran40,l=CRAN,c=
     origin cloud.r-project.org
Pinned packages:
     snapd -> 2.58+22.04.1 with priority -10
     snapd -> 2.58+20.04.1 with priority -10
0

1 Answer 1

5

Your repository setup is missing the main Ubuntu repository needed to install packages. Look for the file containing jammy-security (it’s probably /etc/apt/sources.list.d/official-package-repositories.list):

grep -rl jammy-security /etc/apt/sources.list*

Edit it so that it contains these lines:

deb http://packages.linuxmint.com victoria main upstream import backport

deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

Then update with sudo apt update, and you should be able to install the gnuplot package and its dependencies.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .