Not able to update ubuntu package

I am not able to update ubuntu packages which is causing trouble for installing bolt python libraries.
Please provide solutions.

Hi @mayureshpagare7 ,

Can you share the version of ubuntu you are using. Also let me know if you tried to do an upgrade. From the output you have provided, it seems like you have tried to upgrade to Bionic version(18. Series of ubuntu) and that failed.

You can try the following command if your upgrade from ubuntu 16 to ubuntu 18 had failed;

sudo sed -i -e ‘s/bionic/xenial/g’ /etc/apt/sources.list

But before using this command do confirm the version of the Ubuntu OS here.

Hope this helps.

Hi @mayureshpagare7 ,

Before update you can upgrade your ubuntu version.
you can try the following commands.

sudo apt-get upgrade
sudo apt-get update

I think your problem will be solved.

@ashwin.salgaocar
Its still 16.04. Yes,I tried to update 16.04 to 18.04, but it failed. So, its still 16.04.
Also, the command showed no effect and also @biswasrounik while sudo apt-get update the failed part still shows as failed. Please provide a solution.


I don’t know what to do.

Hi @mayureshpagare7,

Were you able to get about your issue of not being able to update packages? if not, then can you share me the screenshot of /etc/apt/sources.list file. Since your OS version is 16.04, we should only see xeniel. Kindly share the screenshot to confirm the same.

Regarding the most recent screenshot, you have shared, as it shows in the output. You might want to try the following to see if it works;

sudo -H pip3 install boltiot

Let me know if this works for you.

Hi @mayureshpagare7 ,

Have you upgraded your ubuntu first by running the command
sudo apt-get upgrade
If not please upgrade first by running the above command to upgrade ubuntu 16 to 18
After upgrade run
sudo apt-get update

well i tried the boltiot command and it didn’t work.
It is suggesting me update python

i did run both the commands in the sequence you suggested and also inversely.
It shows that all things are updated. But it still is version 16.04. Those commands are not updating ubuntu but just the packages.

@ashwin.salgaocar and @biswasrounik
The latest screenshot is the only problem i am having now. It has neither increased nor decreased.
It shows that i need to update python while i am not able figure out how to? even tried google search but couldn’t get a solution. Please help regarding the problem.

Hi @mayureshpagare7 ,

Please follow the instructions of the following website

Unable update it @akshayan.sinha

@surasahityasagar

Please create a new Topic and state your issue. And what are you trying to update? Ubuntu or the package tool (apt)?

I’m getting those errors when I’m entering the command
sudo apt-get -y update
IMG20211019151321|556x500

@surasahityasagar

Please check if your VMWare is connected to the internet. Run the below command and Press Ctrl+C to exit after sometime.

ping google.com

Share the output of the above command as well.

@surasahityasagar

Can you please try running the below command one by one?

>sudo rm -rf /var/lib/apt/lists/*
>sudo apt-get update

You might have to press ‘Y’ to continue the update.

Still getting this

@surasahityasagar

Most of the files have been updated. You can continue with your training.

If you face any issues with the packages or python modules, create a new topic stating the query.

Hi @surasahityasagar ,

Open your sources.list file and remove all the lines that start from deb cdrom:

 sudo nano /etc/apt/sources.list

and then save the file.

Do let me know in case you need any other information.