3

I wish to install a package called 'mosh' onto Suse (not openSuse). The instructions for mosh are to run a simple sudo zypper in mosh. This sadly results in this on suse:

'mosh' not found in package names. Trying capabilities.
No provider of 'mosh' found.
Resolving package dependencies...

Nothing to do.

In this environment, Suse is being ran on ec2 as a virtual machine. There is no license nor is there any support from Suse. This is just a virtual environment.

Zombies
  • 515
  • 2
  • 6
  • 13
  • Running SLES without support is a bad idea (maybe except for test installations) as you don't get any updates (legally). So better use openSUSE then. Note: Currently OpenSUSE Leap 15.3 is almost identical to SLES 15 SP3. – U. Windl Jul 27 '21 at 09:36

3 Answers3

5

To install a single package that is outside of the officially supported SLES packages you can use the search interface on software.opensuse.org.

On the software page for mosh click on 'Show other versions' and if you're lucky the right SLES version will be available.

I recommend clicking on the first item (in case of SLES 11 SP3 that would be 'network') which leads you to the Open Build Service (OBS) page of mosh at OpenSUSE. There, select 'Download package' which leads you to yet another download page. There you can select your SLES version again and choose your preferred installation method: one click, add repository or direct download of the RPMs.

If you choose 'Add repository and install manually' this yields the following commands:

zypper addrepo http://download.opensuse.org/repositories/network/SLE_11_SP3/network.repo
zypper refresh
zypper install mosh
mleu
  • 166
  • 5
  • That worked flawlessly. I chose add repository and install manually option. I'm going to add the exact commands from that to prevent "link rot". Thanks! – Zombies Jan 11 '14 at 11:38
  • @mleu, I'm just curious, where or how can you find the repository url for SLE_11_SP3? `http://download.opensuse.org/repositories/network/SLE_11_SP3/network.repo` – Aaron Shen Jun 17 '15 at 00:10
  • @AaronShen, these commands come from choosing the 'add repository' path on the [second download page](http://software.opensuse.org/download.html?project=network&package=mosh). – mleu Jun 18 '15 at 06:22
4

SLES and OpenSUSE are two very different species. SUSE is extremely concervative and has very limited package selection.

What follows may affect your SUSE support contract. SUSE support has repeatedly asked to remove any "foreign" packages, so if you follow instructions below, you might end up having a bad day when calling to SUSE support.

Some OpenSUSE packages will run happily on SLES without modification. What you can do is to enable an OpenSUSE repository for zypper and then try to install mosh from it, just to see if it works or not.

To get one of OpenSUSE repositories into zypper you create a file, /etc/zypp/repos.d/OpenSUSE-repositories.repo with following content:

[OpenSUSE-11.4-OSS]
name=OpenSUSE-11.4-OSS
enabled=1
baseurl=http://download.opensuse.org/distribution/11.4/repo/oss/
type=yast

When you've created the file, just run zypper ref OpenSUSE-11.4-OSS and then zypper search mosh.

This example uses OpenSUSE 11.4 and enables only one of the repositories, namely Open Source Software (OSS) repository. Adjust the version to match your SLES version as close as possible (going lower usually works, going higher will not).

You can find list of OpenSUSE repositories here.

  • I tried this on SLES11 SP2 and it was not able to find 'mosh'. Not to be confused with 'moss', which I do not instend to install. You say going lower in version will help. I am not able to find any lower version repo than 11.4. – Zombies Dec 02 '13 at 09:19
  • As said, I'm not sure if mosh is even available from OpenSUSE repositories, that's what was left as an exercise for you. My apologies for that. –  Dec 02 '13 at 09:24
  • The repository can also be added with `zypper addrepo http://download.opensuse.org/distribution/11.4/repo/oss/ OpenSUSE-11.4-OSS`. – Victor Basso Apr 20 '16 at 14:08
2

Check Distro version:

cat /etc/*-release

Output (e.g):

...
--NAME="SLES"
--VERSION="12-SP2"
--VERSION_ID="12.2"
--PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2"
..

Edit repo file in VIM editor:

sudo vi /etc/zypp/repos.d/OpenSUSE-repositories.repo

Insert text (e.g):

[OpenSUSE-12.2-OSS]
name=OpenSUSE-12.2-OSS
enabled=1
baseurl=http://download.opensuse.org/distribution/12.2/repo/oss/
type=yast

press ESC

exit from Vim

:wq

Refresh zypper

sudo zypper refresh

Install MC(e.g)

sudo zypper install mc