Unable to open software managers

Asked by Gerald Fiscus

jerry@jerry-OptiPlex-790:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for jerry:
jerry@jerry-OptiPlex-790:~$ grep proxy /etc/environment
jerry@jerry-OptiPlex-790:~$ echo $http_proxy

jerry@jerry-OptiPlex-790:~$ echo $ftp_proxy

jerry@jerry-OptiPlex-790:~$ grep proxy /etc/bash.bashrc
jerry@jerry-OptiPlex-790:~$ grep proxy ~/.bashrc
grep: /home/jerry/.bashrc: No such file or directory
jerry@jerry-OptiPlex-790:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
jerry@jerry-OptiPlex-790:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
jerry@jerry-OptiPlex-790:~$
jerry@jerry-OptiPlex-790:~$ sudo fuser -vvv /var/lib/dpkg/lock
jerry@jerry-OptiPlex-790:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
jerry@jerry-OptiPlex-790:~$ uname -a
Linux jerry-OptiPlex-790 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:43:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
jerry@jerry-OptiPlex-790:~$ sudo rm /var/lib/apt/lists/lock
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
jerry@jerry-OptiPlex-790:~$ sudo rm /var/lib/apt/lists/lock
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
jerry@jerry-OptiPlex-790:~$
jerry@jerry-OptiPlex-790:~$ sudo rm /var/lib/dpkg/lock
jerry@jerry-OptiPlex-790:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
jerry@jerry-OptiPlex-790:~$
jerry@jerry-OptiPlex-790:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
jerry@jerry-OptiPlex-790:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
jerry@jerry-OptiPlex-790:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
jerry@jerry-OptiPlex-790:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
jerry@jerry-OptiPlex-790:~$ sudo rm -rf /var/lib/dpkg/updates/*
jerry@jerry-OptiPlex-790:~$ sudo rm -rf /var/lib/apt/lists
jerry@jerry-OptiPlex-790:~$ sudo rm /var/cache/apt/*.bin
rm: cannot remove `/var/cache/apt/*.bin': No such file or directory
jerry@jerry-OptiPlex-790:~$ sudo mkdir /var/lib/apt/lists
jerry@jerry-OptiPlex-790:~$ sudo mkdir /var/lib/apt/lists/partial
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get clean
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Type 'ain' is not known on line 2 in source list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
E: The list of sources could not be read.
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
E: Type 'ain' is not known on line 2 in source list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
E: The list of sources could not be read.
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
E: Type 'ain' is not known on line 2 in source list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
E: The list of sources could not be read.
jerry@jerry-OptiPlex-790:~$
jerry@jerry-OptiPlex-790:~$ sudo dpkg --configure -a
jerry@jerry-OptiPlex-790:~$ sudo dpkg --clear-avail
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jerry@jerry-OptiPlex-790:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
E: Type 'ain' is not known on line 2 in source list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
E: The list of sources could not be read.
jerry@jerry-OptiPlex-790:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

     1 # deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main
     2 ain
     3 # deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main #Ubuntu Wine Team PPA

/etc/apt/sources.list.d/oneiric-partner.list

     1 deb http://archive.canonical.com/ubuntu precise partner #Added by software-center

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 11.04 _Natty Narwhal_ - Release amd64 (20110427.1)]/ natty main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted
     6 deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted
    11 deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://us.archive.ubuntu.com/ubuntu/ precise universe
    17 deb-src http://us.archive.ubuntu.com/ubuntu/ precise universe
    18 deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe
    19 deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse
    27 deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse
    28 deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
    29 deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
    30
    31 ## Uncomment the following two lines to add software from the 'backports'
    32 ## repository.
    33 ## N.B. software from this repository may not have been tested as
    34 ## extensively as that contained in the main release, although it includes
    35 ## newer versions of some applications which may provide useful features.
    36 ## Also, please note that software in backports WILL NOT receive any review
    37 ## or updates from the Ubuntu security team.
    38 # deb http://us.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
    39 # deb-src http://us.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
    40
    41 deb http://security.ubuntu.com/ubuntu precise-security main restricted
    42 deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
    43 deb http://security.ubuntu.com/ubuntu precise-security universe
    44 deb-src http://security.ubuntu.com/ubuntu precise-security universe
    45 deb http://security.ubuntu.com/ubuntu precise-security multiverse
    46 deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
    47
    48 ## Uncomment the following two lines to add software from Canonical's
    49 ## 'partner' repository.
    50 ## This software is not part of Ubuntu, but is offered by Canonical and the
    51 ## respective vendors as a service to Ubuntu users.
    52 # deb http://archive.canonical.com/ubuntu natty partner
    53 # deb-src http://archive.canonical.com/ubuntu natty partner
    54
    55 ## This software is not part of Ubuntu, but is offered by third-party
    56 ## developers who want to ship their latest software.
    57 deb http://extras.ubuntu.com/ubuntu precise main
    58 deb-src http://extras.ubuntu.com/ubuntu precise main
jerry@jerry-OptiPlex-790:~$

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Please first run this command in a Terminal:

sudo rm /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

The please send us the full Terminal output from step 9 in the following procedure:

https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

Then reboot and retest.

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#2

Execute the following commands (copy-paste from here one by one)

    sudo sed -i '2 d' /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
    sudo apt-get update
    sudo apt-get dist-upgrade

It should be fine.

Regards
 NikTh

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

head -n 1 /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list | tee ~/ubuntu-wine-ppa-precise.list
tail -n 1 /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list | tee ~/ubuntu-wine-ppa-precise.list
sudo rm /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
sudo mv ~/ubuntu-wine-ppa-precise.list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
sudo apt-get update

Revision history for this message
Gerald Fiscus (jfiscus3) said :
#4

Thanks Mark. That solved the problem and it works great now. No need to send the output of the terminal.
Gerald
---- Mark Rijckenberg <email address hidden> wrote:
> Your question #231687 on apt in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/apt/+question/231687
>
> Status: Open => Needs information
>
> Mark Rijckenberg requested more information:
> Please first run this command in a Terminal:
>
> sudo rm /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
>
> The please send us the full Terminal output from step 9 in the following
> procedure:
>
> https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure
>
> Then reboot and retest.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/apt/+question/231687
>
> You received this question notification because you asked the question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Please mark as solved.

Thanks

Can you help with this problem?

Provide an answer of your own, or ask Gerald Fiscus for more information if necessary.

To post a message you must log in.