1

So when I go to paste in:

sudo add-apt-repository ppa:linuxuprising/java

It says:

N: Ignorerar filen ”linuxuprising-” i katalogen ”/etc/apt/sources.list.d/” eftersom den inte har en filändelse

It's in Swedish but it basically ignores a file because it hasn't got a file ending. After this, I get a bunch of warnings telling me some packages are configured multiple times. No matter what I type it's always ignoring a file from linuxuprising. What do I do?

The content of linuxuprising-java.list is deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main. This normal?

Complete Error message:

N: Ignorerar filen ”linuxuprising-” i katalogen ”/etc/apt/sources.list.d/” eftersom den inte har en filändelse
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/linuxuprising                                                                                                                        -java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-j                                                                                                                        ava.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-sv_SE) is configured multiple times in /etc/apt/sources.list.d/linuxupr                                                                                                                        ising-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-sv) is configured multiple times in /etc/apt/sources.list.d/linuxuprisi                                                                                                                        ng-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/linuxuprisi                                                                                                                        ng-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-java.li                                                                                                                        st:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-java.list                                                                                                                        :1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/linuxuprising                                                                                                                        -java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-j                                                                                                                        ava.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-sv_SE) is configured multiple times in /etc/apt/sources.list.d/linuxupr                                                                                                                        ising-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-sv) is configured multiple times in /etc/apt/sources.list.d/linuxuprisi                                                                                                                        ng-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/linuxuprisi                                                                                                                        ng-java.list:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-java.li                                                                                                                        st:1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/linuxuprising-java.list                                                                                                                        :1 and /etc/apt/sources.list.d/linuxuprising-ubuntu-java-focal.list:1

I tried doing

sudo apt autoremove
sudo apt-get update 
sudo apt-get install openjdk-17-jdk. 

That should remove unneeded packages, update the internal list of packages, and install OpenJDK. But when I try these none of them work, not even the apt-get update. Here is the error I get:

filip@filip:~$ sudo apt autoremove
E: Malformed entry 1 in list file /etc/apt/sources.list.d/linuxuprising.list (Suite)
E: The list of sources could not be read.,
E: Malformed entry 1 in list file /etc/apt/sources.list.d/linuxuprising.list (Suite)
E: The list of sources could not be read.,
filip@filip:~$ sudo apt-get update
E: Malformed entry 1 in list file /etc/apt/sources.list.d/linuxuprising.list (Suite)
E: The list of sources could not be read.,
filip@filip:~$ sudo apt-get install openjdk-17-jdk
E: Malformed entry 1 in list file /etc/apt/sources.list.d/linuxuprising.list (Suite)
E: The list of sources could not be read.,
E: Malformed entry 1 in list file /etc/apt/sources.list.d/linuxuprising.list (Suite)
E: The list of sources could not be read.,

The error looks a little different now after I added a file extension to the linuxuprising directory.

cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://se.archive.ubuntu.com/ubuntu focal main restricted
# deb-src http://se.archive.ubuntu.com/ubuntu focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://se.archive.ubuntu.com/ubuntu focal-updates main restricted
# deb-src http://se.archive.ubuntu.com/ubuntu focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://se.archive.ubuntu.com/ubuntu focal universe
# deb-src http://se.archive.ubuntu.com/ubuntu focal universe
deb http://se.archive.ubuntu.com/ubuntu focal-updates universe
# deb-src http://se.archive.ubuntu.com/ubuntu focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://se.archive.ubuntu.com/ubuntu focal multiverse
# deb-src http://se.archive.ubuntu.com/ubuntu focal multiverse
deb http://se.archive.ubuntu.com/ubuntu focal-updates multiverse
# deb-src http://se.archive.ubuntu.com/ubuntu focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://se.archive.ubuntu.com/ubuntu focal-backports main restricted universe                                                                                                                                                              multiverse
# deb-src http://se.archive.ubuntu.com/ubuntu focal-backports main restricted un                                                                                                                                                             iverse multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://se.archive.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://se.archive.ubuntu.com/ubuntu focal-security main restricted
deb http://se.archive.ubuntu.com/ubuntu focal-security universe
# deb-src http://se.archive.ubuntu.com/ubuntu focal-security universe
deb http://se.archive.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://se.archive.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list.d/
linuxuprising-java.list  linuxuprising-java.list.save  linuxuprising.list  linuxuprising-ubuntu-java-focal.list  linuxuprising-ubuntu-java-focal.list.save  nodesource.list  nodesource.list.save
ItzFoil
  • 11
  • 2
  • 1
    Based on the results, I'd venture that you will need to edit your `linuxuprising-java.list` file to comment out (or remove) the duplicates. Which version of Ubuntu are you running? – matigo Jan 04 '22 at 00:15
  • 1
    Does this answer your question? [How can I fix apt error "W: Target Packages ... is configured multiple times"?](https://askubuntu.com/questions/760896/how-can-i-fix-apt-error-w-target-packages-is-configured-multiple-times) – guiverc Jan 04 '22 at 00:29
  • 1
    Does this answer your question? [How do remove "Ignoring file in directory /etc/apt/sources.list.d/ as it has an invalid filename extension?](https://askubuntu.com/questions/458598/how-do-remove-ignoring-file-in-directory-etc-apt-sources-list-d-as-it-has-an) – karel Jan 04 '22 at 00:33
  • 3
    Why aren't you just using the `openjdk-[version]-[jre/jdk]` packages? What are you trying to do with a PPA? – cocomac Jan 04 '22 at 03:35
  • I tried using the links karel and guiverc provided but it says that the file or directory doesn't exist when I paste in the command. – ItzFoil Jan 04 '22 at 19:54
  • I'd be real careful adding off the wall repo's...Esp. with the log4j exploit. Follow @cocomac 's advice! – EODCraft Staff Jan 04 '22 at 20:00
  • cocomac and @EODCraft Staff, I have already tried and I get the same message – ItzFoil Jan 04 '22 at 20:05
  • @ItzFoil What exact command are you using to install OpenJDK? – cocomac Jan 04 '22 at 20:07
  • @ItzFoil Don't paste in random commands. Understand what they do. – vidarlo Jan 04 '22 at 20:28
  • @cocomac I've tried basically every command I can get my hands on. At last, I got Java 17 installed but the invalid file extension error remains. – ItzFoil Jan 05 '22 at 14:09
  • Try these commands: `sudo apt autoremove && sudo apt-get update && sudo apt-get install openjdk-17-jdk`. That remove un-needed packages, updates the internal list of packages, and installs OpenJDK. [edit] your question to include what happens then – cocomac Jan 05 '22 at 14:52
  • Please [edit] your question to include the output of `cat /etc/apt/sources.list` and `ls /etc/apt/sources.list.d/` – Error404 Jan 08 '22 at 14:09

0 Answers0