Меню Рубрики

Apt get linux not found

Ошибка apt-get command not found

Apt-get — это пакетный менеджер, который используется по умолчанию в семействе дистрибутивов Debian и Ubuntu. Учитывая, что это пакетный менеджер, один из почти самых основных пакетов системы, то логично, что программа должна присутствовать в каждом дистрибутиве. Но все же некоторые пользователи встречаются с ошибкой apt get command not found.

В этой статье мы рассмотрим почему возникает такая ошибка, как это вообще может быть и как исправить apt get команда не найдена.

Что значит apt get команда не найдена?

Фактически это сообщение об ошибке означает как раз то, что оно нам сообщает, команда, которую вы пытаетесь выполнить не найдена в системе. Она либо еще не была установлена, либо была удалена. Но все это звучит очень странно в отношении к менеджеру пакетов. Рассмотрим основные причины возникновения ошибки:

  • Одна из самых очевидных причин, получения ошибки «apt get не найдена» в том, что у вас не Ubuntu. Этот пакетный менеджер используется только в дистрибутивах Linux, основанных на Debian. Системы Red Hat, CentOS, Fedora, OpenSUSE, CoreOS, Cloud Linux, ArchLlinux и другие таковыми не являются. Они имеют собственный пакетный менеджер, у каждой свой и именно его нужно использовать для установки пакетов, а не искать apt.
  • Если вы используете команду apt, а не apt-get, то, возможно, у вас старый дистрибутив, который не поддерживает такого синтаксиса, используйте apt-get;
  • Вторая причина в том что вы случайно или намерено удалили пакет Apt. Его больше нет в системе поэтому система и не может его найти;
  • Третья причина, может быть в невозможности обнаружения программы. Утилита apt есть в системе и исправно работает, но вы повредили переменную среды PATH и теперь система не ищет исполняемые файлы в той папке где находится apt.

Теперь рассмотрим как решить проблему. Это очень просто.

Как исправить apt get команда не найдена?

Поскольку вторая причина предполагает меньше действий, нам нужно сначала проверить ее. Обычно исполняемые файлы apt находятся в каталоге /usr/bin. Сначала посмотрим есть ли такой файл в той папке:

Если файл есть, то вы увидите что-то похожее как на снимке выше. Также обратите внимания на права. Для пользователя, группы и остальных должен быть выставлен флаг «x» означающий исполнение. Если же его нет, то apt придется переустановить. Если права отличаются от приведенных выше, а именно «-rwxr-xr-x», то их тоже нужно исправить, добавим для всех категорий флаг исполняемости:

chmod +x /usr/bin/apt-get

Если предыдущие варианты не сработали проверим содержимое переменной среды PATH:

Вы должны увидеть в ней ссылку на /usr/bin. Если такой строчки нет, то проблема была здесь, а строчку нужно добавить в конец:

Если вы вносили изменения в файл /etc/profile, и переменная PATH сломалась из-за этого, то нужно внести исправления и в этот файл.

Последний вариант, если ничего не помогло, это переустановить утилиту. Мы просто скачаем ее из официального сайта и установим в систему. Только нужно выбирать версию для своей операционной системы. Вы можете скачать пакет с помощью браузера или таких команд:

Для Ubuntu Yakkety:

Теперь осталось установить загруженный пакет:

Готово, после этого ошибка apt get command not found должна исчезнуть и вы сможете нормально работать со своими пакетами.

Выводы

В этой статье мы рассмотрели почему не работает apt get, из-за чего возникает ошибка apt get команда не найдена, а также как ее решить. Надеюсь, приведенная здесь информация была полезной для вас.

Источник

Amazon Linux: apt-get: command not found

I’m trying to install an apache server on my AWS instance, however, it seems that it doesn’t have the apt package installed.

I googled and all I found was some broken links to this package. I am using Putty on a windows machine if that information helps.

I currently have low to none experience in linux enviroments.

I am running the following version of Linux

Can anyone help with that?

10 Answers 10

If you’re using Amazon Linux it’s CentOS-based, which is RedHat-based. RH-based installs use yum not apt-get . Something like yum search httpd should show you the available Apache packages — you likely want yum install httpd24 .

Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses yum .

Try to install your application by using yum command yum install application_name

Check the Linux distribution, apt-get works in Debian based distro whereas yum works in Fedora based distro.

It is also possible your system administrator does not permit you (or did not put you in the group of users who have sudo permissions) to execute apt-get but if you have sudo access try to execute with sudo apt-get

if debian or yum install

if you are using Fedora .

I faced the same issue regarding apt-get: command not found here are the steps how I resolved it on ubuntu xenial

Search the appropriate version of apt from here ( apt_1.4_amd64.deb for ubuntu xenial)

Download the apt.deb

Install the apt.deb package

sudo dpkg -i apt_1.4_amd64.deb

Now we can easily run

sudo apt-get install htop

For Debian based Linux distributions:

Try to use sudo apt install

instead of the usual sudo apt-get install

apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).

There can be 2 issues :=

The short answer:

The long version:

This is one of the command which you can run to install apt-get:

For openSUSE Linux distribution:

This answer is for complete AWS beginners:

I had this issue but it was because I was trying to run a command from a tutorial inside my Mac computer. What I actually needed to do was SSH into my AWS machine, and then run the same command there. Ta Da, it worked:

Click this button in your EC2 instance, to be able to copy the SSH command. setup your SSH keys https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html and then you can SSH into your machine

Once here, you can run your sudo apt-get command.

Источник

Linux apt-get command not found — How to install a package in Arch Linux?

I am trying to install a command:

How can I install apt-get then?

I use command below to find Out My Linux Distribution Name and Version:

Any ideas what should I do to install a command in Arch Linux?

6 Answers 6

First of all, Arch provides a beautiful, well maintained wiki. You may want to read it first before working with Arch. The pre-installed package manager is «pacman».

To install a package from the official repositories, you will need to use it like this:

There is also a community maintained version, the Arch User Repository, for packages not part of the official repository.

I used this page https://wiki.archlinux.org/index.php/Pacman_Rosetta when I moved to Arch linux, it lists the equivalent commands for various common package managers, including apt and pacman.

If you really want to download apt, then:

  1. Install pacaur $ pacman -S pacaur
  2. Install apt, from pacaur (no root) $ pacaur -S apt
  3. Add some repositories
  4. Now you have working apt on arch linux

Arch linux does not generally use the apt package manager. It uses pacman: https://wiki.archlinux.org/index.php/Pacman

You can’t. Arch does not use the apt package system unlike Debian-based linuxes, like Ubuntu. Instead it uses the pacman package manager. However, you should try it out. Using pacman myself, I never had a problem with it, and you can still use it in order to install packages that you can get with the apt package manager.

As @Marcus mentioned, pacman is the builtin package manager. However, it won’t give you access to AUR packages.

aurman is a nice wrapper that also searches and installs from AUR. yaourt used to be popular but according to the AUR wiki it is insecure and not featurefull. aurman cli works almost exactly like pacman so you can follow a pacman guide just the same. To get aurman :

Not the answer you’re looking for? Browse other questions tagged archlinux apt-get or ask your own question.

Linked

Related

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2020.9.18.37632

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Clover mac os официальный сайт
  • Clover mac os загрузка
  • Clover mac os x mavericks
  • Close combat mac os
  • Clone mac os to ssd