removido
(usa Nenhuma)
Enviado em 09/04/2016 - 12:50h
Resumo da opera:
O comando apt no LinuxMint, é diferente do mesmo no Ubuntu, e desconheço o motivo disso.
~ ru4n e
~listeiro_037
Vi a pouco em uma instalação com Ubuntu LTS 14.04.4 64Bits, nele é realmente um binário.
O meu teste inicial, foi realizado em uma maquina com o LinuxMint 17.3 dos meus tios, que me acionaram no plano de suporte "Family premium 24X7 full assistance" enquanto lia o VOL.
Vejam só:
LinuxMint 17.3
lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 17.3 Rosa
Release: 17.3
Codename: rosa
Tipo de arquivo
file $(which apt)
/usr/local/bin/apt: Python script, ASCII text executable
Vejam o código dele no Mint:
#! /usr/bin/python
import sys, os
def usage():
print "apt"
print "Usage: apt command [options]"
print " apt help command [options]"
print ""
print "Commands:"
print "add-repository - Add entries to apt sources.list"
print "autoclean - Erase old downloaded archive files"
print "autoremove - Remove automatically all unused packages"
print "build - Build binary or source packages from sources"
print "build-dep - Configure build-dependencies for source packages"
print "changelog - View a package's changelog"
print "check - Verify that there are no broken dependencies"
print "clean - Erase downloaded archive files"
print "contains - List packages containing a file"
print "content - List files contained in a package"
print "deb - Install a .deb package"
print "depends - Show raw dependency information for a package"
print "dist-upgrade - Perform an upgrade, possibly installing and removing packages"
print "download - Download the .deb file for a package"
print "dselect-upgrade - Follow dselect selections"
print "held - List all held packages"
print "help - Show help for a command"
print "hold - Hold a package"
print "install - Install/upgrade packages"
print "policy - Show policy settings"
print "purge - Remove packages and their configuration files"
print "recommends - List missing recommended packages for a particular package"
print "rdepends - Show reverse dependency information for a package"
print "reinstall - Download and (possibly) reinstall a currently installed package"
print "remove - Remove packages"
print "search - Search for a package by name and/or expression"
print "show - Display detailed information about a package"
print "source - Download source archives"
print "sources - Edit /etc/apt/sources.list with nano"
print "unhold - Unhold a package"
print "update - Download lists of new/upgradable packages"
print "upgrade - Perform a safe upgrade"
print "version - Show the installed version of a package"
print " This apt has Super Cow Powers"
sys.exit(1)
if len(sys.argv) < 2:
usage()
sudo="sudo"
if os.getuid() == 0 :
sudo=""
if os.environ.get("EDITOR") != None:
editor = os.environ.get("EDITOR")
else:
editor = "/usr/bin/editor"
argcommand = sys.argv[1]
argsuffix = sys.argv[2:]
showHelp = False
if argcommand == "help":
if len(sys.argv) < 3:
usage()
showHelp = True
argcommand = sys.argv[2]
argsuffix = sys.argv[3:]
argoptions = ""
for argoption in argsuffix:
argoptions = argoptions + " " + argoption
if argcommand in ["install", "remove", "update", "upgrade", "dist-upgrade", "clean", "dselect-upgrade", "build-dep", "check", "autoremove", "autoclean"]:
aptcommand = "apt-get"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["source", "moo"]:
aptcommand = "apt-get"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["search", "show", "changelog"]:
aptcommand = "aptitude"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["recommends"]:
command = "/usr/lib/linuxmint/mintSystem/mint-apt-recommends.py " + argoptions
elif argcommand in ["reinstall"]:
aptcommand = "aptitude"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["stats", "depends", "rdepends", "policy"]:
aptcommand = "apt-cache"
command = aptcommand + " " + argcommand + argoptions
elif argcommand == "sources":
command = sudo + " " + editor + " /etc/apt/sources.list"
elif argcommand == "held":
command = "dpkg --get-selections | grep hold"
elif argcommand == "contains":
command = "dpkg -S" + argoptions + " | sort"
elif argcommand == "content":
command = "dpkg -L" + argoptions + " | sort"
elif argcommand == "hold":
command = "echo " + argoptions + " hold | sudo dpkg --set-selections"
elif argcommand == "unhold":
command = "echo " + argoptions + " install | sudo dpkg --set-selections"
elif argcommand == "version":
command = "/usr/lib/linuxmint/common/version.py" + argoptions
elif argcommand == "purge":
command = sudo + " apt-get remove --purge" + argoptions
elif argcommand == "build":
command = sudo + " dpkg-buildpackage" + argoptions
elif argcommand == "deb":
command = sudo + " dpkg -i" + argoptions
elif argcommand == "download":
command = "LC_ALL=C apt-cache depends " + argoptions + " |grep -v \"Conflicts:\|Replaces:\"|awk '{print $NF}'|sed -e 's/[<>]//g'|xargs aptitude download -r"
elif argcommand == "add-repository":
command = sudo + " add-apt-repository" + argoptions
else:
usage()
# Color highlighting
if argcommand in ["search", "show", "content", "version", "policy", "depends", "rdepends"] and len(argoptions.strip()) > 1:
command = command + " | highlight" + argoptions
if (showHelp):
print "\"apt "+ argcommand + argoptions + "\" is equivalent to \"" + command + "\""
else:
os.system(command)
Qual pacote é o dono do arquivo:
dpkg -S $(which apt)
mintsystem: /usr/local/bin/apt
Informações do pacote no Mint:
aptitude show mintsystem
Package: mintsystem
State: installed
Automatically installed: no
Version: 8.1.6
Priority: opcional
Section: admin
Maintainer: Clement Lefebvre <clem@linuxmint.com>
Architecture: all
Uncompressed Size: 154 k
Depends: python, dconf-gsettings-backend | gsettings-backend, aptitude, cowsay,
fortune, fortunes-husse, mint-common, mint-info, zenity
Description: Linux Mint System Base Package
Used by the desktop and other mint tools to gather information and process
common system tasks.
===============================
Ubuntu 14.04.4 LTS:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
file $(which apt)
/usr/bin/apt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=525122cbb544713de21b2091de7bd3500c0ee07d, stripped
dpkg -S $(which apt)
apt: /usr/bin/apt
Informações do pacote no Ubuntu:
aptitude show apt
Pacote: apt
Essencial: sim
Estado: instalado
Automaticamente instalado: não
Versão: 1.0.1ubuntu2.12
Prioridade: importante
Seção: admin
Mantenedor: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Arquitetura: amd64
Tamanho Descompactado: 3.663 k
Depende de: libapt-pkg4.12 (>= 0.9.16), libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), ubuntu-keyring, gnupg
Sugere: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt
Conflita com: python-apt (< 0.7.93.2~), python-apt (< 0.7.93.2~), apt
Quebra: manpages-it (< 2.80-4~), manpages-it (< 2.80-4~), manpages-pl (< 20060617-3~), manpages-pl (< 20060617-3~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~),
sun-java5-jdk (> 0), sun-java5-jdk (> 0), sun-java6-jdk (> 0), sun-java6-jdk (> 0)
Substitui: manpages-it (< 2.80-4~), manpages-it (< 2.80-4~), manpages-pl (< 20060617-3~), manpages-pl (< 20060617-3~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~),
sun-java5-jdk (> 0), sun-java5-jdk (> 0), sun-java6-jdk (> 0), sun-java6-jdk (> 0)
Descrição: gerenciador de pacotes em linha de comando
Este pacote fornece ferramentas em linha de comando para busca e gerenciamento assim como consultas de informações sobre pacotes como um acesso de baixo nível a todas as funcionalidades da biblioteca
libapt-pkg.
These include:
* apt-get for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies
* apt-cache for querying available information about installed as well as installable packages
* apt-cdrom to use removable media as a source for packages
* apt-config as an interface to the configuration settings
* apt-key as an interface to manage authentication keys
------------------------------------------------------
KISS principle, RTFM and STFW = 42