Welcome!
Important information
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-18.1 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.3.1 release info here

New users[/u
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

(Solved) WARNING:root:could not open file '/etc/apt/sources.list'

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 17967
Joined: Fri Dec 15, 2006 8:07 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#21

Post by Stevo » Fri Feb 01, 2019 3:51 pm

When searching for what packages distros have, plus if MX has them, I have found repology to be a valuable tool.

https://repology.org/metapackage/sayonara/versions

I'll update it to 1.1.1 in our test repo.

The "apt-add-repository" command presents the current distro release to a PPA, in our case MX 18 Continuum. However, since PPAs only build Ubuntu packages, that did not match any of the Ubuntu code names like xenial, bionic, etc., so that's why you got the error--and why we don't support using it on MX. You can manually add a PPA per the directions on its page with a release similar to Stretch, such as trusty (older than Stretch) or xenial (a little newer), and hope that they work, but it's a gamble that you could possibly lose in a big way, especially if you hook up a PPA that does system packages such as gcc or xorg updates.

It's always going to be safer to use our own repos.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 17967
Joined: Fri Dec 15, 2006 8:07 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#22

Post by Stevo » Fri Feb 01, 2019 5:18 pm

Built the 1.1.1+git20180905 release, installed, and it works well. It's on its way to the test repo, but you can get and install the deb from this zip archive: https://drive.google.com/open?id=14o78M ... mDENKrrIuP

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2929
Joined: Wed Apr 11, 2018 5:09 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#23

Post by fehlix » Fri Feb 01, 2019 6:01 pm

philotux wrote:
Fri Feb 01, 2019 3:48 pm
Does apttestrepo command work similar to the "regular" apt. That is can I run

Code: Select all

sudo apttestrepo update 
and so on?
Well, as I was looking for a way to easly checking mx testrepo from the command line without the need of changing any default source-list files within /etc/apt/source.list.d. I do use a little apt trick to use an addtional temporary source.list files for mx testrepo. Further I do not have to update for full apt-sources package list, when I only add temporary test-repo list, it's a kind of an apt-"overlay" for temporary enabling addtional sources. You can use all commands which "apt" would accept.
Examples:

Code: Select all

sudo apttestrepo update
You can check that if works in conjunction with apt:
Check version of a package in "default" repos: apt policy virtualbox

Code: Select all

LANG=en_US.UTC-8 apt policy virtualbox
virtualbox:
  Installed: 5.2.24-dfsg-4~mx17+1
  Candidate: 5.2.24-dfsg-4~mx17+1
  Version table:
 *** 5.2.24-dfsg-4~mx17+1 500
        500 http://mxrepo.com/mx/repo stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     5.2.22-dfsg-1~mx17+1 500
        500 http://repo.antixlinux.com/stretch stretch/main amd64 Packages
Check version of a package with addtionally enabled "MX testrepo": apttestrepo policy virtualbox

Code: Select all

LANG=en_US.UTC-8 apttestrepo  policy virtualbox

## /etc/apt/sources.list.d/mx.list
## mx-testrepo
deb http://mxrepo.com/mx/testrepo/ stretch test
sudo apt -o Dir::Etc::sourcelist=/tmp/mx-testrepo-apt-sources.list.d-temp.fehlix.8642.529626986/temp_source.list policy virtualbox
virtualbox:
  Installed: 5.2.24-dfsg-4~mx17+1
  Candidate: 6.0.4-dfsg-1~mx17+1
  Version table:
     6.0.4-dfsg-1~mx17+1 500
        500 http://mxrepo.com/mx/testrepo stretch/test amd64 Packages
 *** 5.2.24-dfsg-4~mx17+1 500
        500 http://mxrepo.com/mx/repo stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     5.2.22-dfsg-1~mx17+1 500
        500 http://repo.antixlinux.com/stretch stretch/main amd64 Packages
And without re-updateing the source again check again version available of a package in "default" repos:
apt policy virtualbox

Code: Select all

LANG=en_US.UTC-8 apt policy virtualbox
virtualbox:
  Installed: 5.2.24-dfsg-4~mx17+1
  Candidate: 5.2.24-dfsg-4~mx17+1
  Version table:
 *** 5.2.24-dfsg-4~mx17+1 500
        500 http://mxrepo.com/mx/repo stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     5.2.22-dfsg-1~mx17+1 500
        500 http://repo.antixlinux.com/stretch stretch/main amd64 Packages
here my little apttestrepo wrapper script
apttestrepo:

Code: Select all

#!/bin/bash

#set -x
ACTION="$1"

TEMP_SOURCES_BASE="/tmp/mx-testrepo-apt-sources.list.d-temp.$USER"
TEMP_SOURCES_LIST_D="${TEMP_SOURCES_BASE}.$$.$RANDOM$RANDOM"
TEMP_SOURCES_LIST=$TEMP_SOURCES_LIST_D/temp_source.list

rm -fr ${TEMP_SOURCES_BASE}.*
mkdir $TEMP_SOURCES_LIST_D

echo -e "\n## /etc/apt/sources.list.d/mx.list" | tee  $TEMP_SOURCES_LIST
echo -e "## mx-testrepo" | tee -a $TEMP_SOURCES_LIST
cat /etc/apt/sources.list.d/mx.list | grep -m1 -E "^#[[:space:]]+(deb https?.*mx/testrepo.*)" |  grep -o -E "(deb https?.*mx/testrepo.*)" | tee -a $TEMP_SOURCES_LIST

APT_OPTION="-o Dir::Etc::sourcelist=$TEMP_SOURCES_LIST"
[ "$ACTION" = "update" ] && APT_OPTION="-o Dir::Etc::sourceparts=- -o APT::Get::List-Cleanup=0 $APT_OPTION"


echo sudo apt $APT_OPTION "${@}"
sudo apt $APT_OPTION "${@}"

################################################
exit
################################################
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

philotux
Forum Regular
Forum Regular
Posts: 393
Joined: Sun Apr 22, 2018 12:57 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#24

Post by philotux » Fri Feb 01, 2019 6:19 pm

fehlix wrote:
Fri Feb 01, 2019 6:01 pm
Well, as I was looking for a way to easly checking mx testrepo from the command line without the need of changing any default source-list files within /etc/apt/source.list.d. I do use a little apt trick to use an addtional temporary source.list files for mx testrepo. Further I do not have to update for full apt-sources package list, when I only add temporary test-repo list, it's a kind of an apt-"overlay" for temporary enabling addtional sources. You can use all commands which "apt" would accept.
....
That's a really smart trick! Let's see if I can replicate your steps on my system and get it to work.
Thank you so much for taking your time to explain it so thoroughly and for sharing your script.

regards,
"philotux"

User avatar
Moltke
Forum Regular
Forum Regular
Posts: 120
Joined: Tue Dec 19, 2017 6:07 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#25

Post by Moltke » Sat Feb 02, 2019 2:13 pm

here my little apttestrepo wrapper script
apttestrepo:

Code: Select all

#!/bin/bash

#set -x
ACTION="$1"

TEMP_SOURCES_BASE="/tmp/mx-testrepo-apt-sources.list.d-temp.$USER"
TEMP_SOURCES_LIST_D="${TEMP_SOURCES_BASE}.$$.$RANDOM$RANDOM"
TEMP_SOURCES_LIST=$TEMP_SOURCES_LIST_D/temp_source.list

rm -fr ${TEMP_SOURCES_BASE}.*
mkdir $TEMP_SOURCES_LIST_D

echo -e "\n## /etc/apt/sources.list.d/mx.list" | tee  $TEMP_SOURCES_LIST
echo -e "## mx-testrepo" | tee -a $TEMP_SOURCES_LIST
cat /etc/apt/sources.list.d/mx.list | grep -m1 -E "^#[[:space:]]+(deb https?.*mx/testrepo.*)" |  grep -o -E "(deb https?.*mx/testrepo.*)" | tee -a $TEMP_SOURCES_LIST

APT_OPTION="-o Dir::Etc::sourcelist=$TEMP_SOURCES_LIST"
[ "$ACTION" = "update" ] && APT_OPTION="-o Dir::Etc::sourceparts=- -o APT::Get::List-Cleanup=0 $APT_OPTION"


echo sudo apt $APT_OPTION "${@}"
sudo apt $APT_OPTION "${@}"

################################################
exit
################################################
Pretty cool solution! Just tried it and works great! :happy: Thanks for sharing! By the way, Sayonara has nothing to offer over Clementine. I thought it might be something like guayadeque player maybe a little better but...haven't played that much with it but still...so far not impressed.
Without each other's help there ain't no hope for us :happy:

philotux
Forum Regular
Forum Regular
Posts: 393
Joined: Sun Apr 22, 2018 12:57 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#26

Post by philotux » Sat Feb 02, 2019 7:34 pm

fehlix wrote:
Fri Feb 01, 2019 6:01 pm
I do use a little apt trick to use an addtional temporary source.list files for mx testrepo.

Code: Select all

apttestrepo 
is phenomenal!

Code: Select all

sudo apttestrepo update
## /etc/apt/sources.list.d/mx.list
## mx-testrepo
deb http://nl.mxrepo.com/mx/testrepo/ stretch test 
...
Reading state information... Done
126 packages can be upgraded. Run 'apt list --upgradable' to see them.

Code: Select all

sudo apt update
...
Reading state information... Done
All packages are up to date.
Thank you, fehlix!

:puppy:

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2929
Joined: Wed Apr 11, 2018 5:09 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#27

Post by fehlix » Sat Feb 02, 2019 7:41 pm

philotux wrote:
Sat Feb 02, 2019 7:34 pm
Thank you, fehlix!
Thanks, you for letting me know. I'm running it for couple of mounth now, and it as prooven to work
in harmony with apt. Sure it might be possibly get enhanced by adding other cli tools like apt-get, dpkg etc.
But it's good to know that somehow else finds it usefull too.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

philotux
Forum Regular
Forum Regular
Posts: 393
Joined: Sun Apr 22, 2018 12:57 pm

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#28

Post by philotux » Sat Feb 02, 2019 7:45 pm

fehlix wrote:
Sat Feb 02, 2019 7:41 pm
Sure it might be possibly get enhanced by adding other cli tools like apt-get, dpkg etc.
But it's good to know that somehow else finds it usefull too.
Sure. It's already such a nice tool and if you find time to make those additions, that will make it even more phenomenal.

Thanks again and best of luck!
philotux
:happy:

User avatar
asqwerth
Forum Veteran
Forum Veteran
Posts: 4104
Joined: Sun May 27, 2007 5:37 am

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#29

Post by asqwerth » Sat Feb 02, 2019 7:48 pm

Moltke wrote:
Sat Feb 02, 2019 2:13 pm


... By the way, Sayonara has nothing to offer over Clementine. I thought it might be something like guayadeque player maybe a little better but...haven't played that much with it but still...so far not impressed.
Have you tried lollypop?
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
KoO
Forum Regular
Forum Regular
Posts: 420
Joined: Fri Feb 10, 2017 1:21 am

Re: (Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#30

Post by KoO » Sat Feb 02, 2019 8:22 pm

Quod Libet is a nice player. 4.2 is in MX test repo
AntiX 17.3 (4.20) i3 ,MX18 (4.19.13),windows8.1 , Intel Xeon E3-1241 v3 , 16gb HyperX , EVO 860 500 GB , EVO 860 500 GB , GTX 970 :linuxlove:
Lenovo T430 AntiX17.3 (4.20) i3 ,MX18 (4.19.13),windows8.1 , i5 +4000 , 8gb , EVO 860 500 GB , 1TB HGST

Post Reply

Return to “General”