1

I'm trying to install packages using zypper but Amazon server that runs Ubuntu seems not to have zypper installed. How can I install zypper?

code: zypper install git gcc gcc-c++

error:

> unsupported locale setting
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 69, in main
    enable_i18n()
  File "/usr/lib/command-not-found", line 40, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.3/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
2
  • What is your locale set to ? Does it install if you temporarily change that?
    – Hennes
    Jul 30, 2013 at 14:06
  • try sudo apt-get install <package name > If you dont find it you will need to add a repo of the software
    – Shekhar
    Jul 30, 2013 at 14:08

3 Answers 3

6

zypper is the suse package manager.

Ubuntu uses apt (in whatever flavor you choose. aptitude, apt-get, etc.).

You might be able to find a version of zypper for Ubuntu but I wouldn't bet on it... nor would I suggest you even bother trying. Just use one of the apt family of tools.

As an aside that error isn't directly related to the zypper problem and is actually an issue in the 'command not found' helper that Ubuntu tried to use to tell you what to install to get the command you wanted. I have no idea why that would be happening offhand but it certainly appears to be a local issue.

1
  • Ubuntu also has apt command by itself, not just aptitude, apt-get etc. Try apt update; apt upgrade, one cool thing about apt (something) is that it has sort of a progress bar for the installation/upgrade process.
    – trve.fahad
    Dec 27, 2014 at 22:25
0

You can also just install Zypper on Ubuntu:

sudo apt install zypper

Reference: Zypper in Launchpad

0

You CAN NOT install any software package by zypper on Ubuntu, because glibc on Ubuntu is diffrent from glibc on openSUSE. I suggest you to chroot into openSUSE installation. TESTED on Ubuntu 20.04

`sudo apt install zypper

sudo zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/oss repo-oss

sudo zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/non-oss repo-non-oss

sudo zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/debug repo-debug

sudo zypper ar -f -c http://download.opensuse.org/update/tumbleweed/ repo-update

sudo zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-oss repo-src-oss

sudo zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-non-oss repo-src-non-oss`

You must log in to answer this question.

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