Autor Tópico: dependência não encontrada  (Lida 946 vezes)

Offline Jenny

  • Usuário Ubuntu
  • *
  • Mensagens: 16
    • Ver perfil
    • Aprendizagem digital
dependência não encontrada
« Online: 15 de Setembro de 2009, 19:11 »
Preciso instalar um jogo infantil (abc-blocks_0.1-1_all.deb) e ao fazê-lo o GDebi me diz que há dependencia de libgtk-perl. Fui ao Synaptic e ao invés dele, encontrei libgtk2-perl que já está instalado...O que posso fazer?
A liberdade está em aprender sempre!
Jenny Horta
Usuária Linux Ubuntu nº #474916

Offline Riccardo Petrillo

  • Usuário Ubuntu
  • *
  • Mensagens: 240
    • Ver perfil
Re: dependência não encontrada
« Resposta #1 Online: 16 de Setembro de 2009, 12:42 »
Existem alguns comandos de manutenção para solucionar esse tipo de problema:

Procurar arquivos corrompidos: sudo apt-get check

Corrigir problemas de dependências, concluir instalação de pacotes pendentes e outros erros:

sudo apt-get -f install

Remover pacotes com problemas: sudo apt-get -f remove

Solucionar problemas causados por interrupção na instalação, e pendencias na configuração do pacote:

sudo dpkg --configure -a

Remove restos de compilações anteriores e módulos desnecessários: # make clean 

Ver pacotes órfãos, deve-se instalar o pacote: sudo deborphan

Remover pacotes órfãos:

sudo deborphan | xargs sudo apt-get -y remove --purge

Para remoção de pacotes instalados automaticamente e que não tem mais nenhuma utilidade para o sistema e que consome recursos da máquina.

Basta digitar o comando no terminal: sudo apt-get autoremove

Para remover pacotes antigos ou duplicados: sudo apt-get autoclean


Talvez isso ajude... até+
Notebook Samsung core i5, 8gb Ram, Nvidia 2 gb, windows 10.

Offline Xterminator

  • Usuário Ubuntu
  • *
  • Mensagens: 1.279
    • Ver perfil
Re: dependência não encontrada
« Resposta #2 Online: 16 de Setembro de 2009, 16:37 »
Preciso instalar um jogo infantil (abc-blocks_0.1-1_all.deb) e ao fazê-lo o GDebi me diz que há dependencia de libgtk-perl. Fui ao Synaptic e ao invés dele, encontrei libgtk2-perl que já está instalado...O que posso fazer?
Extraí o pacote .deb aqui no Windows do trampo com o TUGZip, o programa é antigo em GTK1 logo vai ser difícil você conseguir instalar, por isto ele pede libgtk-perl e não libgtk2-perl.
já pensou em enviar o e-mail para o mantenedor do pacote?
olhei o código fonte do programa e é bem simples, creio que seja bem fácil portar para libgtk2-perl.

Citar
Package: abc-blocks
Version: 0.1-1
Section: games
Priority: optional
Architecture: all
Depends: libgtk-perl (>= 0.7009), libgnome-perl (>= 0.7009)
Maintainer: Wagner Saback Dantas <wagnersNONOSPAMgeness.ufsc.br>

Ou algum amigo do fórum de plantão que manja de perl e gtk2 ;-)
este é o código fonte só do binário sem o restante dos arquivos OK?
Código: [Selecionar]
#!/usr/bin/perl

######################################################################
#  A small educational "game" that may be fun for small kids that
#  are learning to write.
#
#  Currently supports the Swedish, English, and Hebrew alphabets.
#  
#  Dov Grobgeld <dovNONOSPAMimagic.weizmann.ac.il>
#  12 Apr 2001
#  This program is released under the GPL (Gnu Public Licence).
######################################################################

use Gtk;
use Gnome;
use strict;

# Defaults
my ($letter_width, $width, $height, %W);
my ($last_cx, $last_cy);
my ($alphabet_tile_size, $alphabet, $alphabet_width, $language);

# Pics root directory
my $pics_root_dir = '/usr/share/abc-blocks';

# Database of languages supported
my %languages = (
swedish => {
    alphabet => 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ',
    alphabet_img => $pics_root_dir . '/alfabet.png',
    alphabet_small_img => $pics_root_dir . '/alfabet-liten.png',
   },
english => {
    alphabet => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    alphabet_img => $pics_root_dir . '/english.png',
    alphabet_small_img => $pics_root_dir . '/english-small.png',
   },
hebrew => {
   alphabet => "àáâãäåæçèéëêìîíðïñòôóöõ÷øùú",
   alphabet_img => $pics_root_dir . "/alefbet.png",
   alphabet_small_img => $pics_root_dir . "/alefbet-small.png",
   dir=>"rtl",
  }
     );

#######################################################################
#  Callback functions. There are only two callback functions needed.
#  One handling the index card (small alphabet) and one handling the
#  individual cards.
######################################################################
my ($latest_card, $dragging);
sub index_card_cb {
    my($item, $event) = @_;
    my ($root) = $W{root};
    my $tag = shift;
    my $char_idx = int($event->{x}/$letter_width);
    my $x = $event->{x};
    my $y = $event->{y};

    if ($event->{type} eq "button_press") {
if ($event->{button} == 1) {
   if ($alphabet->{dir} eq "rtl") {
$char_idx = length($alphabet->{alphabet})-$char_idx-1;
   }
   
   $latest_card = create_card($W{canvas},
      $W{big_card}, $alphabet_tile_size,
      [$char_idx % $alphabet_width,
int($char_idx/$alphabet_width),
      ],
      [$x, $y],
     );
   $dragging = 1;
}
    }
    # This is the tricky part. We are getting motion events for the
    # index card (small alphabet), but we are using these motion events
    # to move the $latest_card that was created above. Once the
    # card is released and clicked upon again, then the move_card_cb is
    # called instead.
    elsif ($event->{type} eq "motion_notify") {
if ($dragging) {
   my $new_x = $event->{x};
   my $new_y = $event->{y};

   $latest_card->move($new_x-$last_cx,$new_y-$last_cy);

   $last_cx = $new_x;
   $last_cy = $new_y;
}
    }
    elsif ($event->{type} eq "button_release") {
$dragging = 0;
    }

}

sub move_card_cb {
    my($item, $event) = @_;

    if ($event->{type} eq "button_press") {
if ($event->{button} eq '1') {
   $item->raise_to_top();
   $last_cx = $event->{x};
   $last_cy = $event->{y};

   $dragging++;
} elsif ($event->{button} eq '3') {
   $item->destroy();
}
    }
    elsif ($event->{type} eq "motion_notify") {
if ($dragging) {
   my $new_x = $event->{x};
   my $new_y = $event->{y};

   $item->move($new_x-$last_cx,$new_y-$last_cy);

   $last_cx = $new_x;
   $last_cy = $new_y;
}
    }
    elsif ($event->{type} eq "button_release") {
if ($event->{button} eq '1') {
   $dragging=0;
}
    }

    
}

######################################################################
#  Create the GUI.
######################################################################
sub create_widgets {
    $W{top} = Gtk::Widget->new("Gtk::Window",
      type                 => -toplevel,
      title                =>      "AbcBlocks",
      allow_grow           =>      0,
      allow_shrink         =>      0,
      "signal::destroy"    => sub { exit }
     );

    my $vbox = Gtk::VBox->new(0, 1);
    show $vbox;
    $W{top}->add($vbox);

    $W{canvas} = $vbox->new_child("Gnome::Canvas",
 visible=>1);
    $W{canvas}->set_usize($width,$height);
    $W{canvas}->set_scroll_region (0, 0, $width, $height);

    $W{root} = $W{canvas}->root();

    $W{top}->show_all;

}

######################################################################
#  Cut an image out of the big images and create a card out of it.
#  To make it nicer looking we also create a rectangle of the same
#  size at an offset and place it under the image. This makes it
#  look like a shade.
######################################################################
sub create_card {
    my $root = shift;
    my $big_card = shift;
    my $size = shift;
    my $src_pos = shift;
    my $dst_pos = shift;
    my ($src_x, $src_y) = @$src_pos;
    my ($dst_x, $dst_y);
    if ($dst_pos) {
($dst_x, $dst_y) = @$dst_pos;
    } else {
($dst_x, $dst_y) = ($src_x,$src_y);
    }

    my $photo = $big_card->crop_and_clone_image($src_x*$size, $src_y*$size,
$size, $size);
    my ($cx, $cy) = ($dst_x, $dst_y);

    my $card_group =
Gnome::CanvasItem->new($W{root},
      "Gnome::CanvasGroup",
      "x", $cx-50,
      "y", $cy-50,
      "signal::event" => [\&move_card_cb]
     );

    # Switch side of shade for rtl languages as it looks nicer that way.
    my $dx = 3;
    $dx = -3 if $alphabet->{dir} eq "rtl";
    Gnome::CanvasItem->new($card_group,
      "Gnome::CanvasRect",
      "x1", $dx,
      "y1", 3,
      "x2", 100+$dx,
      "y2", 103,
      "width_pixels" => 2,
      "fill_color" => 'grey70'
     );

    Gnome::CanvasItem->new($card_group,
  "Gnome::CanvasImage",
  image=>$photo,
  x=>0,
  y=>0,
  width=>100,
  height=>100,
  anchor=>"nw"
 );
    
    ($last_cx, $last_cy) = ($cx, $cy);

    return $card_group;
}

# Create the big images
sub create_big_cards {
    my ($card_name, $small_card_name) = @_;
    
    $W{big_card} = load_image Gtk::Gdk::ImlibImage($card_name);
    $W{small_alphabet_photo} = load_image Gtk::Gdk::ImlibImage($small_card_name);
    $W{small_alphabet_item} = Gnome::CanvasItem->new($W{root},
    "Gnome::CanvasImage",
    image => $W{small_alphabet_photo},
    width=> $W{small_alphabet_photo}->rgb_width,
    height=> $W{small_alphabet_photo}->rgb_height,
    anchor=> "nw",
   
    x=>0,
    y=>0,
    "signal::event" => [\&index_card_cb]    
   );

}


# Get options
while($_ = $ARGV[0], /^-/) {
    shift;
    /^-help/ and do  { print <<__; exit; };
color-matrix - A game for 4-6 year olds

Syntax:
    color-matrix cardfile

Options:
    -card_size cs   Change card size. Default is 100.
__
    /^-card_size/ and do { $alphabet_tile_size = shift; next; };
    /^-language/ and do { $language = shift; next; };
    die "Unknown option $_!\n";
}

$alphabet_width = 6;
$alphabet_tile_size = 100;
$language = "english" unless $language;

$alphabet = $languages{lc($language)}
    || die "Unsupported language $language!\n";

# Defaults
$letter_width = 30;
$width = length($alphabet->{alphabet})*$letter_width;
$height = 700;

$alphabet_tile_size = 100 unless $alphabet_tile_size;

init Gnome($0,$0);

create_widgets();
create_big_cards($alphabet->{alphabet_img}, $alphabet->{alphabet_small_img});

main Gtk;

« Última modificação: 16 de Setembro de 2009, 16:41 por Xterminator »

Offline Jenny

  • Usuário Ubuntu
  • *
  • Mensagens: 16
    • Ver perfil
    • Aprendizagem digital
Re: dependência não encontrada
« Resposta #3 Online: 17 de Setembro de 2009, 16:31 »
É...percebi por dedução que o programinha deve estar desatualizado. Vou saber com outros profs que o utilizam, sobre o que fizeram e entrar em contato com o desenvolvedor. Obrigada!
A liberdade está em aprender sempre!
Jenny Horta
Usuária Linux Ubuntu nº #474916