Strona 1 z 1

Niedziałające apt-get update

: 12 maja 2017, 23:40
autor: rafaeru
Na wstępie powiem, że nie ogarniam jeszcze forum ( jest to moja pierwsza wizyta ) i nie jestem pewien czy umieszczam mój problem w odpowiednim dziale.

Parę dni temu instalowałem bota do głosowego serwera Teamspeak i podczas podążania za poradnikiem w pewnym momencie wywaliło mi bazę danych MySQL ( zauważyłem to później dlatego nie jestem w stanie stwierdzić co mogło być dokładną przyczyną ). Po próbie ponownego zainstalowania MySQL zmieniłem swoje source.list na standardowe i po próbie wpisania apt-get update odrazu wyskoczyło: Reading package lists... Done
Obrazek

Przy próbie zainstalowania MySQL mam następujący błąd:

Kod: Zaznacz cały

Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate
E: Package 'mysql-client' has no installation candidate
Szukałem w internecie ale nic nie udało mi się znaleźć. Z góry dziękuję.

Re: Niedziałające apt-get update

: 13 maja 2017, 10:48
autor: dedito
A gdzie ten poradnik, gdzie te source.list?
Wyniki komend wklejaj razem z komendami wywołującymi.

Re: Niedziałające apt-get update

: 13 maja 2017, 12:52
autor: liske1
Na początek pokaż jaką masz wersję debiana:

Kod: Zaznacz cały

cat /etc/debian_version
oraz pokaż co masz w /etc/apt/sources.list

Kod: Zaznacz cały

cat /etc/apt/sources.list

Re: Niedziałające apt-get update

: 13 maja 2017, 16:16
autor: rafaeru

Kod: Zaznacz cały

root@vps271844:~# cat /etc/debian_version
8.8
...

W trakcie sprawdzania zauważyłem, że mam literówkę zamiast sources.list mialem source.list

Kod: Zaznacz cały

root@vps271844:~# cat /etc/apt/sources.list
deb http://ftp.pl.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.pl.debian.org/debian/ stable main contrib non-free

deb http://ftp.pl.debian.org/debian/ stable-updates main contrib non-free
deb-src http://ftp.pl.debian.org/debian/ stable-updates main contrib non-free

deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://security.debian.org/ stable/updates main contrib non-free
apt-get update juz działa, ale nadal mam problem z zainstalowaniem MySQL

Kod: Zaznacz cały

root@vps271844:~# apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
 mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Re: Niedziałające apt-get update

: 13 maja 2017, 20:28
autor: dedito
Spróbuj

Kod: Zaznacz cały

dpkg --configure -a
I potem ponów instalację mysql

Re: Niedziałające apt-get update

: 19 maja 2017, 08:56
autor: rafaeru

Kod: Zaznacz cały

root@vps271844:~# dpkg --configure -a
Setting up man-db (2.6.2-1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
Updating database of manual pages ...
Plik Config.pm

Kod: Zaznacz cały

#!/usr/bin/perl -w
# This file was preprocessed, do not edit!


package Debconf::Question;
use strict;
use Debconf::Db;
use Debconf::Template;
use Debconf::Iterator;
use Debconf::Log qw(:all);


use fields qw(name priority);

our %question;


sub new {
	my Debconf::Question $this=shift;
	my $name=shift;
	my $owner=shift;
	my $type=shift || die "no type given for question";
	die "A question called \"$name\" already exists"
		if exists $question{$name};
	unless (ref $this) {
		$this = fields::new($this);
	}
	$this->{name}=$name;
	return unless defined $this->addowner($owner, $type);
	$this->flag('seen', 'false');
	return $question{$name}=$this;
}


sub get {
	my Debconf::Question $this=shift;
	my $name=shift;
	return $question{$name} if exists $question{$name};
	if ($Debconf::Db::config->exists($name)) {
		$this = fields::new($this);
		$this->{name}=$name;
		return $question{$name}=$this;
	}
	return undef;
}


sub iterator {
	my $this=shift;

	my $real_iterator=$Debconf::Db::config->iterator;
	return Debconf::Iterator->new(callback => sub {
		return unless my $name=$real_iterator->iterate;
		return $this->get($name);
	});
}


sub _expand_vars {
	my $this=shift;
	my $text=shift;
		
	return '' unless defined $text;

	my @vars=$Debconf::Db::config->variables($this->{name});
	
	my $rest=$text;
	my $result='';
	my $variable;
	my $varval;
	my $escape;
	while ($rest =~ m/^(.*?)(\\)?\${([^{}]+)}(.*)$/sg) {
		$result.=$1;  # copy anything before the variable
		$escape=$2;
		$variable=$3;
		$rest=$4; # continue trying to expand rest of text
		if (defined $escape && length $escape) {
			$result.="\${$variable}";
		}
		else {
			$varval=$Debconf::Db::config->getvariable($this->{name}, $variable);
			$result.=$varval if defined($varval); # expand the variable
		}
	}
	$result.=$rest; # add on anything that's left.
	
	return $result;
}


sub description {
	my $this=shift;
	return $this->_expand_vars($this->template->description);
}


sub extended_description {
	my $this=shift;
	return $this->_expand_vars($this->template->extended_description);
}


sub choices {
	my $this=shift;
	
	return $this->_expand_vars($this->template->choices);
}


sub choices_split {
	my $this=shift;
	
	my @items;
	my $item='';
	for my $chunk (split /(\\[, ]|,\s+)/, $this->choices) {
		if ($chunk=~/^\\([, ])$/) {
			$item.=$1;
		} elsif ($chunk=~/^,\s+$/) {
			push @items, $item;
			$item='';
		} else {
			$item.=$chunk;
		}
	}
	push @items, $item if $item ne '';
	return @items;
}


sub variable {
	my $this=shift;
	my $var=shift;
	
	if (@_) {
		return $Debconf::Db::config->setvariable($this->{name}, $var, shift);
	}
	else {
		return $Debconf::Db::config->getvariable($this->{name}, $var);
	}
}


sub flag {
	my $this=shift;
	my $flag=shift;

	if ($flag eq 'isdefault') {
		debug developer => "The isdefault flag is deprecated, use the seen flag instead";
		if (@_) {
			my $value=(shift eq 'true') ? 'false' : 'true';
			$Debconf::Db::config->setflag($this->{name}, 'seen', $value);
		}
		return ($Debconf::Db::config->getflag($this->{name}, 'seen') eq 'true') ? 'false' : 'true';
	}

	if (@_) {
		return $Debconf::Db::config->setflag($this->{name}, $flag, shift);
	}
	else {
		return $Debconf::Db::config->getflag($this->{name}, $flag);
	}
}


sub value {
	my $this = shift;
	
	unless (@_) {
		my $ret=$Debconf::Db::config->getfield($this->{name}, 'value');
		return $ret if defined $ret;
		return $this->template->default if ref $this->template;
	} else {
		return $Debconf::Db::config->setfield($this->{name}, 'value', shift);
	}
}


sub value_split {
	my $this=shift;
	
	my $value=$this->value;
	$value='' if ! defined $value;
	my @items;
	my $item='';
	for my $chunk (split /(\\[, ]|,\s+)/, $value) {
		if ($chunk=~/^\\([, ])$/) {
			$item.=$1;
		} elsif ($chunk=~/^,\s+$/) {
			push @items, $item;
			$item='';
		} else {
			$item.=$chunk;
		}
	}
	push @items, $item if $item ne '';
	return @items;
}


sub addowner {
	my $this=shift;

	return $Debconf::Db::config->addowner($this->{name}, shift, shift);
}


sub removeowner {
	my $this=shift;

	my $template=$Debconf::Db::config->getfield($this->{name}, 'template');
	return unless $Debconf::Db::config->removeowner($this->{name}, shift);
	if (length $template and 
	    not $Debconf::Db::config->exists($this->{name})) {
		$Debconf::Db::templates->removeowner($template, $this->{name});
		delete $question{$this->{name}};
	}
}


sub owners {
	my $this=shift;

	return join(", ", sort($Debconf::Db::config->owners($this->{name})));
}


sub template {
	my $this=shift;
	if (@_) {
		my $oldtemplate=$Debconf::Db::config->getfield($this->{name}, 'template');
		my $newtemplate=shift;
		if (not defined $oldtemplate or $oldtemplate ne $newtemplate) {
			$Debconf::Db::templates->removeowner($oldtemplate, $this->{name})
				if defined $oldtemplate and length $oldtemplate;

			$Debconf::Db::config->setfield($this->{name}, 'template', $newtemplate);

			$Debconf::Db::templates->addowner($newtemplate, $this->{name},
				$Debconf::Db::templates->getfield($newtemplate, "type"));
		}
	}
	return Debconf::Template->get(
		$Debconf::Db::config->getfield($this->{name}, 'template'));
}


sub name {
	my $this=shift;

	return $this->{name};
}


sub priority {
	my $this=shift;

	$this->{priority}=shift if @_;

	return $this->{priority};
}


sub AUTOLOAD {
	(my $field = our $AUTOLOAD) =~ s/.*://;

	no strict 'refs';
	*$AUTOLOAD = sub {
		my $this=shift;

		if (@_) {
			return $Debconf::Db::config->setfield($this->{name}, $field, shift);
		}
		my $ret=$Debconf::Db::config->getfield($this->{name}, $field);
		unless (defined $ret) {
			$ret = $this->template->$field() if ref $this->template;
		}
		if (defined $ret) {
			if ($field =~ /^(?:description|extended_description|choices)-/i) {
				return $this->_expand_vars($ret);
			} else {
				return $ret;
			}
		}
	};
	goto &$AUTOLOAD;
}

sub DESTROY {
}


1

Przy instalacji coś takiego:

Kod: Zaznacz cały

root@vps271844:~# apt-get install mysql-server-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mysql-server-5.5 : Depends: libdbi-perl but it is not going to be installed
                    Depends: mysql-client-5.5 (>= 5.5.55-0+deb8u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Re: Niedziałające apt-get update

: 19 maja 2017, 10:22
autor: dedito

Kod: Zaznacz cały

dpkg --get-selections | grep hold

Re: Niedziałające apt-get update

: 19 maja 2017, 18:10
autor: rafaeru
Po wpisaniu

Kod: Zaznacz cały

dpkg --get-selections | grep hold
nic sie nie dzieje

Re: Niedziałające apt-get update

: 19 maja 2017, 19:12
autor: dedito

Kod: Zaznacz cały

apt-get install --reinstall debconf