Como usar o macport para instalar software?

1
$ sudo port install linkchecker
--->  Computing dependencies for openssl
--->  Verifying checksum(s) for openssl
Error: No checksum set for openssl-1.0.0f.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for openssl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_openssl/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade python27 failed
To report a bug, see <http://guide.macports.org/#project.tickets>

Parece que a porta não tem um estado limpo para começar?

[EDIT1] sudo port -d selfupdate

Estou atrás de um firewall que pode não permitir rsync .

$ sudo port -d selfupdate
Password:
--->  Updating the ports tree
DEBUG: Synchronizing ports tree(s)
Synchronizing local ports tree from file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/
DEBUG: /usr/bin/svn update --non-interactive /opt/local/var/macports/sources/svn.macports.org/trunk/dports
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-pyqt4/Portfile
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-mhash/Portfile
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-tweepy/Portfile
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-pyttsx/Portfile
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-docx/Portfile
U    /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/py-clint/Portfile
 U   /opt/local/var/macports/sources/svn.macports.org/trunk/dports/gnome/gnucash-devel
Updated to revision 88813.
Creating port index in /opt/local/var/macports/sources/svn.macports.org/trunk/dports
Adding port aqua/Readown
Failed to parse file archivers/arj/Portfile: invalid command name "get_canonical_archflags"
Failed to parse file archivers/gzip/Portfile: invalid command name "installs_libs"
Failed to parse file archivers/ucl/Portfile: invalid command name "get_canonical_archflags"
Failed to parse file archivers/unzip/Portfile: invalid command name "installs_libs"
Failed to parse file archivers/upx/Portfile: invalid command name "get_canonical_archflags"
Failed to parse file archivers/xdelta/Portfile: invalid command name "get_canonical_archflags"
Failed to parse file archivers/zip/Portfile: invalid command name "installs_libs"
Failed to parse file archivers/zoo/Portfile: invalid command name "get_canonical_archflags"
.
.
.

[EDIT2] sudo port clean --all openssl

sudo port clean --all openssl não funcionou.

$ sudo port install linkchecker
--->  Computing dependencies for openssl
--->  Verifying checksum(s) for openssl
Error: No checksum set for openssl-1.0.0f.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for openssl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_openssl/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade python27 failed
To report a bug, see <http://guide.macports.org/#project.tickets>
$ sudo port clean --all openssl
--->  Cleaning openssl
$ sudo port install linkchecker
--->  Computing dependencies for openssl
--->  Fetching openssl
--->  Attempting to fetch openssl-1.0.0f.tar.gz from http://www.openssl.org/source/
--->  Verifying checksum(s) for openssl
Error: No checksum set for openssl-1.0.0f.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for openssl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_openssl/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade python27 failed
To report a bug, see <http://guide.macports.org/#project.tickets>
$

[EDIT3] a instalação do tarball também não funciona

$ more /opt/local/etc/macports/sources.conf
#  MacPorts system wide sources configuration file
#  $Id: sources.conf 42662 2008-11-28 23:18:50Z [email protected] $

<snip>   

#  To get the ports tree from the master MacPorts server in California, USA use:
#      rsync://rsync.macports.org/release/ports/
#  To get it from the mirror in Trondheim, Norway use:
#      rsync://trd.no.rsync.macports.org/release/ports/
#  A current list of mirrors is available at http://trac.macports.org/wiki/Mirrors
#rsync://rsync.macports.org/release/ports/ [default]
#http://www.macports.org/files/ports.tar.gz [default]
file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/ [default]
$ sudo vim /opt/local/etc/macports/sources.conf
$ sudo port -d sync
DEBUG: Synchronizing ports tree(s)
Synchronizing local ports tree from http://www.macports.org/files/ports.tar.gz
No updates for http://www.macports.org/files/ports.tar.gz
$ more /opt/local/etc/macports/sources.conf
$ sudo port install linkchecker
--->  Computing dependencies for openssl
--->  Fetching openssl
--->  Attempting to fetch openssl-1.0.0f.tar.gz from http://www.openssl.org/source/
--->  Verifying checksum(s) for openssl
Error: No checksum set for openssl-1.0.0f.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for openssl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_openssl/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade python27 failed
To report a bug, see <http://guide.macports.org/#project.tickets>
    
por qazwsx 12.01.2012 / 18:56

1 resposta

2

Você parece ter um Portfile corrompido: sua porta openssl não tem um conjunto de variáveis checksums .

A operação clean --all não é de nenhuma ajuda porque limpa o distfile (o arquivo real para a porta que está sendo construída) e o diretório de trabalho, não o Portfile.

Você pode verificar se o seu Portfile atual tem configurações de checksums executando

port cat openssl | grep checksums ; echo $?

a 1 como saída significa que o Portfile está corrompido.

A maneira mais fácil de restaurar o arquivo é excluí-lo e, em seguida, ressincronizar, quando em rsync ou svn (não tenho certeza sobre o tarball único). Então volte para o svn no sources.conf, isto é, restaure a entrada file: /// , e execute:

sudo port -d sync; sudo rm $(port dir openssl)/Portfile; sudo port -d sync

Os erros em EDIT 2 significam que seu comando port não sabe sobre procedimentos usados em portfiles, ou seja, está desatualizado. Não tenho certeza porque o selfupdate não o atualizou.

    
por 16.02.2012 / 15:21