Ultimamente, tenho experienciado um problema no mínimo estranho. Em alguns dos computadores que instalei o Ubuntu, ao activar os repositórios restricted, universe e multiverse, o resultado, depois de fechar a janela, volta a ser o inicial. Ou seja, fica como se não tivesse mudado nada.


Assim, nesta mensagem, vou explicar como se activa estes repositórios “normalmente” e, para quem tem este problema, vou explicar como se activa de uma forma mais complicada. Activar estes repositórios tem como objectivo dar um leque de opções maior em relação aos pacotes. Depois de activados tem, por exemplo, à sua disposição pacotes para ler mp3, divX, programas como o Adobe Reader, etc.

Mas, atenção, o Ubuntu tem os repositórios separados pois em alguns países, usar software licenciado, sem uma licença, é proibido. Por exemplo, aqui, em Portugal, ao contrário do Brasil, para ler mp3 é necessário uma licença, caso não tenha está ilegal.

De seguida ficam as características de cada repositório:

  • Main: Repositórios que o Ubuntu disponibiliza sem activar nada. São programas TOTALMENTE livres;
  • Restricted: Repositórios qua não têm uma licença totalmente livre, sendo, portanto, o suporte feito pelos programadores do software em questão e não pelos programadores do Ubuntu;
  • Universe: Repositórios que os programadores Ubuntu não dão garantias de actualizações nem outro tipo de suporte aos pacotes;
  • Multiverse: Repositórios com pacotes não livres. É necessário ter uma licença para os ter.


Agora que tem uma noção do que está a fazer, vamos activar os repositórios.

Activar os repositórios de uma forma normal, fácil

Para activar os repositórios, basta ir ao Gestor de Pacotes Synaptic (Sistema->Administração->Gestor de Pacotes Synaptic), ir ao menu Configurações e escolher Repositórios.De seguida deve pôr um visto em todas as caixas, excepto na do Código Fonte. O resultado deve ser este:
Clique em Fechar.

Depois volte a ir a Configurações->Repositórios, de forma a certificar do trabalho que fez. Caso esteja como anteriormente (sem os vistos), deve seguir os seguintes pontos de forma a adicionar os vistos manualmente.

Activar os repositórios através do ficheiro sources.list para o GUTSY GIBBON
Todos este vistos que foram adicionados são guardados num ficheiro. Esse ficheiro tens os caminhos e os servidores, que o Sistema Operativo deve seguir para obter os pacotes. O modo como são guardados os vistos é simples: se não tiver o visto, o Sistema Operativo comenta a linha do repositório correspondente, de forma a não utilizar nas pesquisas.

Assim, conforme o exemplo seguinte, pode ver que os repositórios universe e multiverse estão sem o visto, uma vez que tem o símbolo ‘#’ que faz com que o resto da linha fique comentado.

deb http://ubuntu.dcc.fc.up.pt/ gutsy main restricted
deb http://ubuntu.dcc.fc.up.pt/ gutsy-updates main restricted
deb http://ubuntu.dcc.fc.up.pt/ gutsy-security main restricted

#deb http://ubuntu.dcc.fc.up.pt/ gutsy universe multiverse
#deb http://ubuntu.dcc.fc.up.pt/ gutsy-updates universe multiverse
#deb http://ubuntu.dcc.fc.up.pt/ gutsy-security universe multiverse

deb http://ubuntu.dcc.fc.up.pt/ gutsy-backports main restricted universe multiverse

Agora que sabe a teoria vamos à prática.



Os repositórios estão num ficheiro localizado na pasta /etc/apt/ e chama-se sources.list e está protegido, obviamente. Assim, para poder editar, deve abrir com sudo. Ou seja, escreva no terminal:

sudo gedit /etc/apt/sources.list


Aparecerá o programa gedit com o ficheiro aberto. Depois, basta tirar o símbolo ‘#’ das linhas dos servidores, ficando com um aspecto semelhante a este (as linhas a verde tinham o ‘#’ no inicio):


#deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy main restricted
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy universe
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy universe
# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates universe
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy multiverse
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy multiverse
# Line commented out by installer because it failed to verify:
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
# Line commented out by installer because it failed to verify:
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse

## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://pt.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://pt.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu gutsy partner
deb-src http://archive.canonical.com/ubuntu gutsy partner

# Line commented out by installer because it failed to verify:
deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
# Line commented out by installer because it failed to verify:
deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
# Line commented out by installer because it failed to verify:
deb http://security.ubuntu.com/ubuntu gutsy-security universe
# Line commented out by installer because it failed to verify:
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe
# Line commented out by installer because it failed to verify:
deb http://security.ubuntu.com/ubuntu gutsy-security multiverse
# Line commented out by installer because it failed to verify:
deb http://archive.ubuntu.com/ubuntu/ gutsy main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ gutsy-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu/ gutsy-updates universe main multiverse restricted
deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse

Para não ter este trabalho, ou caso um dia perca este ficheiro, pode copiar as seguintes sources.list, que vem do meu PC, e estão bem organizadas:

# Automatically generated sources.list
# http://www.ubuntu-nl.org/source-o-matic/
#
# If you get GPG errors with this sources.list, locate the GPG key in this file
# and run these commands (where KEY is replaced with that key)
#
# gpg –keyserver hkp://subkeys.pgp.net –recv-keys KEY
# gpg –export –armor KEY | sudo apt-key add -
#
# If you don’t know what to do with this file, read
# https://help.ubuntu.com/community/Repositories/CommandLine

# Ubuntu supported packages
# GPG key: 437D05B5
deb http://ubuntu.dcc.fc.up.pt/ gutsy main restricted
deb http://ubuntu.dcc.fc.up.pt/ gutsy-updates main restricted
deb http://ubuntu.dcc.fc.up.pt/ gutsy-security main restricted

# Ubuntu community supported packages
# GPG key: 437D05B5
deb http://ubuntu.dcc.fc.up.pt/ gutsy universe multiverse
deb http://ubuntu.dcc.fc.up.pt/ gutsy-updates universe multiverse
deb http://ubuntu.dcc.fc.up.pt/ gutsy-security universe multiverse

# Ubuntu backports project
# GPG key: 437D05B5
deb http://ubuntu.dcc.fc.up.pt/ gutsy-backports main restricted universe multiverse

Agora, sim, tem os repositórios instalados e, se quiser, pode usufruir desta dica de modo a poder instalar os programas mais rapidamente.

8 Respostas ate agora.

  1. 5 mg on July 1, 2009 weighing in at 263lbs. ,

  2. Psychiatricpsychiatric [i]prednisone for eustachian tube dysfunction[/i] cathartics of controle have included temprana and spurious snatch disturbances.

  3. If this condition occurs, your doctor may give you some medicines that can lower the amount of cholesterol and fats in the blood. ,

  4. generic name for the drug plavix ,

  5. [...] ter uma noção de repositórios, aconselha-se a visitar o artigo Activar os Repositórios do Ubuntu (deve ter a noção que este artigo tem os repositórios da distribuição anterior, que não [...]

  6. [...] Para começar, a sua distribuição deve ter todos repositórios activados, assim aconselho a visitar este artigo para os activar. Se não tem muito conhecimento acerca dos vários repositórios na distribuição Ubuntu, aconselho também a visualizar este artigo. [...]

Deixe um comentario