aptitude update fails - localization problem with sources.list?

Dear all,
after modifying and updating my /etc/sources.list I get the following error. Google wasn't my friend until now, so maybe one of you can help me.


/# aptitude update
Err http://ftp.us.debian.org stable Release.gpg
Could not resolve âftp.us.debian.orgâ
Err http://ftp.us.debian.org stable/main Translation-en_GB
Could not resolve âftp.us.debian.orgâ
Err http://ftp.us.debian.org stable/contrib Translation-en_GB
Could not resolve âftp.us.debian.orgâ
Err http://ftp.us.debian.org stable/non-free Translation-en_GB
Could not resolve âftp.us.debian.orgâ
Reading package lists... Done

The strange signs in Could not resolve âftp.us.debian.orgâ seem to be the problem. This remains the same when creating a new sources.list with the vi. Is that a localization problem?

I currently disabled all other entries in the sources.list than http://ftp.us.debian.org stable main contrib non-free.

Any idea? Thanks in advance,
nilson

No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: aptitude update fails - localization problem with sources.li

The sources.list file should be a plain ASCII text file only. Perhaps your editor saved changes in UTF-8 or some such and you have non-ASCII characters? This is the only thing I can think of that would cause one set of new entries to fail. See if the 'locale' of 'vi' can be set to 'C'.

Re: aptitude update fails - localization problem with sources.li

hi pinniped,
thanx for giving the hint. How would I set the locale of vi can be set to 'C'. I guess that has got nothing to do with the system-wide locales?

*** edit ***

:~# locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

when set LC_ALL="C" the value will still be empty. Is there another way how I could set LC_ALL?

thanx, nilson

Re: aptitude update fails - localization problem with sources.li

OK:

export lang=latin1
vim

This will only work if vim edits a file with 'latin1' encoding, so you can't edit your already-utf-8 file; vim will not convert it. However, you may be able to copy a working file and edit that.

I guess an alternative would be to see if the apt tools are language dependent and can be set to use 'utf-8' (in which case it SHOULD work with the usual ASCII as well as genuine UTF-8 for English characters).

To make the setting somewhat permanent, you can put :set encoding=latin1 into the .vimrc file (you may need to create that file).

Syndicate content