fpnd icon indicating copy to clipboard operation
fpnd copied to clipboard

add-apt-repository command fails on some bionic server installs

Open sarnold opened this issue 5 years ago • 1 comments

For some as-yet unknown reason, the above command fails on one bionic RPi server instance:

# apt-add-repository ppa:nerdboy/embedded
Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 107, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 117, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 612, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 146, in get_sources
    self.get_mirrors()
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 461, in get_mirrors
    self, mirror_template="http://%s.archive.ubuntu.com/ubuntu/")
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 170, in get_mirrors
    et = ElementTree(file=fname)
  File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 557, in __init__
    self.parse(file)
  File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 600, column 36

sarnold avatar Aug 02 '20 20:08 sarnold

The workaround is follow the manual "install" method documented on the PPA page under the dropdown link: Technical details about this PPA. Use the button to select your Ubuntu release, copy the required content into a new file under /etc/apt/sources.list.d/ and save the file, then run the apt-key command as shown in the README:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 41113ed57774ed19

sarnold avatar Aug 02 '20 20:08 sarnold