How to fix "Malformed entry 1 in list file /etc/apt/sources.list.d/pgdg.list (Component)" error? - ubuntu-19.04

E: Malformed entry 1 in list file /etc/apt/sources.list.d/pgdg.list (Component)
E: The list of sources could not be read.

Try this:
Remove the list -> sudo rm /etc/apt/sources.list.d/pgdg.list
Retry to import it again, but first check if you have everything installed that is required (for example you could use lsb_release in your URL or similar things)

Regardless of what I do, I still get this error:
Malformed entry 1 in list file /etc/apt/sources.list.d/wine-obs.list (Suite)
E: The list of sources could not be read.
running on the windows store ubuntu version codename: bionic

Related

libboost1.74-dev is not installing on Ubuntu 16.04

My current boost package is libboost-all-dev(default version 1.58.0.1) which is very old for my current need. So I tried -
sudo apt-get install libboost1.74 libboost1.74-dev
It showed me error of somekind -
libboost1.74 is already the newest version (1.74-0~16~ubuntu16.04.1).
The following NEW packages will be installed:
libboost1.74-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9,325 kB of archives.
After this operation, 139 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 393826 files and directories currently installed.)
Preparing to unpack .../libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb ...
Unpacking libboost1.74-dev (1.74-0~16~ubuntu16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
However I tried several times before to manually install boost libraries. They does not seem to work though so I deleted them manually. Is this problem related to my manual deletion process? Or maybe I am doing something wrong?
The message makes it clear that you need to uninstall 1.58 first:
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev

Bash on Ubuntu on Windows can't use `sudo apt-get install <packagename>`

I was excited to use bash on windows but quickly ran into an issue. I am trying to install build-essential, but I get a dependency issue. Upon trying to resolve with sudo apt-get install -f, I run into another error that doesn't make much sense. I've tried update and upgrade, but that didn't work either. F
barzevp#UK-LT-8356:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
libc6-dev : Depends: linux-libc-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
barzevp#UK-LT-8356:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-libc-dev
The following NEW packages will be installed
linux-libc-dev
0 to upgrade, 1 to newly install, 0 to remove and 43 not to upgrade.
5 not fully installed or removed.
Need to get 0 B/767 kB of archives.
After this operation, 3,946 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 28660 files and directories currently installed.)
Preparing to unpack .../linux-libc-dev_3.13.0-123.172_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-123.172) ...
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-123.172_amd64.deb (--unpack):
unable to install new version of /usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
E: Sub-process /usr/bin/dpkg returned an error code (1)
Full log of what led to the error in Bash on Ubuntu on Windows terminal is here:
https://pastebin.com/dq2D2Gtz
I don't have a solution, but I see the root of the problem. It seems to have to do with case sensitivity on the filesystem. The package for linux-libc-dev puts two copies of a file in /usr/include/linux/netfilter_ipv6 with only a difference in case; ip6t_HL.h, and ip6t_hl.h. After placing ip6t_HL.h, it attempts to rename ip6t_hl.h.dpkg-new to ip6t_hl.h. The system call to rename the file fails, claiming that ip6t_hl.h already exists
On a "real" linux system, ip6t_HL.h and ip6t_hl.h would clearly be different files. Under WSL they probably had some strange incompatibilities to work out between NTFS's default case insensitive FS and unix's default case sensitivity.
You can duplicate the problem by hand e.g., with
echo hi > foo.H
echo hi > foo.h-new
mv foo.h-new foo.h
mv: cannot move 'foo.h-new' to 'foo.h': File exists
strace output:
rename("/usr/include/linux/netfilter_ipv6/ip6t_HL.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_HL.h") = 0
open("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", O_WRONLY) = 10
fsync(10) = 0
close(10) = 0
rename("/usr/include/linux/netfilter_ipv6/ip6t_hl.h.dpkg-new", "/usr/include/linux/netfilter_ipv6/ip6t_hl.h") = -1 EEXIST (File exists)
write(2, "dpkg: error processing archive /"..., 199dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_4.4.0-98.121_amd64.deb (--install):
unable to install new version of '/usr/include/linux/netfilter_ipv6/ip6t_hl.h': File exists
) = 199
I had the same problem. Like #dmattp I found that it this is because, unfortunately, the package contains some (header) files with names that are distinct only by letter case, and that the wonderful WSL file system has an inconsistency regarding case sensitiveness.
Here is a workaround, assuming that the package has name linux-libc-dev_3.13.0-123.172_amd64.deb:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev_3.13.0-123.172_amd64.deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter_ipv4/ipt_ttl.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev_3.13.0-123.172_amd64-patched.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev_3.13.0-123.172_amd64-patched.deb
It says dependencies aren't being installed, so try:
sudo apt-get install linux-libc-dev
If that doesn't work try:
sudo apt-get install --reinstall build-essential
This will reinstall build-essential. Hope this helps, cheers!

Dpkg: warning: files list file for package 'x'missing; assuming package has no files currently installed in Ubuntu 16.04

I am using Ubuntu 16.04 with lubunut desktop environment. I had the following problem for more than 3 days when I do apt-get upgrade. I don't know what is problem means and how to solve.
Note: 3 days before I try upgrade Linux-header-4.4.66, but it showed an error. I deleted it. Now, I'm back to Linux-header-4.4.64, which worked fine before.
Error on sudo apt-get dist-upgrade (only last 15 line of 500+ line error):
dpkg: warning: files list file for package 'libxcb-xkb1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvorbis-dev:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-core7:amd64' missing; assuming package has no files currently installed
(Reading database ... 37151 files and directories currently installed.)
Preparing to unpack .../libgtk-3-bin_3.18.9-1ubuntu3.2_amd64.deb ...
Adding 'diversion of /usr/sbin/update-icon-caches to /usr/sbin/update-icon-caches.gtk2 by libgtk-3-bin'
dpkg-divert: error: rename involves overwriting '/usr/sbin/update-icon-caches.gtk2' with
different file '/usr/sbin/update-icon-caches', not allowed
dpkg: error processing archive /var/cache/apt/archives/libgtk-3-bin_3.18.9-1ubuntu3.2_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libgtk-3-bin_3.18.9-1ubuntu3.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I solved this problem at last night. If you know Chinese, you can read this solution on my blog. I'll detail it here with my poor English.
Create three files in you desktop or anywhere you want.
fix.sh
txt
fixit.py
Add contents in these files
fix.sh: Just an Empty file.
txt: Copy your log into this file with '\n' to separate each line. Just like this:
dpkg: warning: files list file for package 'libxcb-xkb1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvorbis-dev:amd64' missing; assuming package has no files currently installed
fixit.py: fill the file with the following contents.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Fitzeng'
import re
def main():
fix = open('fix.sh', 'w+')
for line in open("txt"):
pkg = re.match(re.compile('''dpkg: warning: files list file for package '(.+)' '''), line)
if pkg:
cmd = "sudo apt-get install --reinstall " + pkg.group(1)
fix.write(cmd + '\n')
if __name__ == "__main__":
main()
Execute these file.
chmod 777 *
python fixit.py
./fix.sh
OK, problem solved. Actually, you'll find you could alternately just reinstall these packages. So, you can fix it in many ways.

Requirements Error while installing Ruby using RVM

I'm getting the following error while trying to install Ruby 2.0.0 with RVM (Linux Mint 17)
A previous answer here recommends that I "Remove broken or 404 repos from my sources list /etc/apt/sources.list"
The problem is that on Linux Mint 17, my sources list has only one line #deb cdrom:[Linux Mint 17 _Qiana_ - Release amd64 2xxxxxxx]/ trusty contrib main non-free.
Therefore,the three broken 404 repos:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 not found
are not in this sources.list file
Can you help me on this?
$ rvm install ruby 2.0.0
Searching for binary rubies, this might take some time.
No binary rubies available for: mint/17/x86_64/ruby-2.0.0-p481.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for mint.
Installing requirements for mint.
Updating system................
Error running 'requirements_debian_update_system ruby-2.0.0-p481',
showing last 15 lines of /home/james/.rvm/log/1xxxxxxxxx_ruby-2.0.0-p481/update_system.log
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
As it says in the answer I linked to in my question,
RVM will fail if you don't remove or comment out any broken or 404 Repos from your sources list /etc/apt/sources.list
The problem is that for some reason, you cant get direct access to all the repos on LinuxMint 17... unlike Ubuntu.
I ran sudo apt-get update:
This will show you the broken packages at the end... For me, this was:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages
404 not found
Since I cant just comment it out because I don't have access to the full source.list (or I cant find it), I found out that in Linux Mint 17, you can use the GUI.
So I went to Menu >> Software >> Software Sources >> PPA to un-tick the broken Launchpad Repos.
After doing this, I ran rvm install 2.0.0 again and everything worked as expected.
The new standard sources.list moved to
/etc/apt/sources.list.d/official-package-repositories.list
And before modifications of it try to run
sudo apt-get update

Help Installing psycopg2 on snow leopard : command '/usr/bin/gcc-4.0' failed with exit status 1

This has been driving me crazy for 2 days.
I have been trying to install psycopg2 using easy_install and no matter what I try (i.e using gcc-4.0 instead of the snow leopard default one) I always get the same error:
error: Setup script exited with error: command '/usr/bin/gcc-4.0' failed with exit status 1
Please see: http://dpaste.com/hold/228252/
I have googled that error so many times and nothing I have found seem to help.
Looks like you're missing a dependency, the development files for libpq. The relevant log part is here:
In file included from psycopg/psycopgmodule.c:32In file included from psycopg/psycopgmodule.c:32:
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory
Try installing libpq development files and then rerun easy_install. You may hit another missing dependency; pay attention to the first error that GCC spits out.
Link http://dpaste.com/hold/228252/ seems to be dead, this is how I solved this problem (Mac OS X 10.6, virtualenv).
If pip fails with this message, just take a look to build folder in your virtual environment. You should edit setup.cfg file there, particularly include_dirs and library_dirs. In first one set your include folders, my option was:
include_dirs=/opt/local/include/postgresql84:/opt/local/include/postgresql84/server
and most likely you will need to set library_dirs to correct location as well:
library_dirs=/opt/local/lib/postgresql84.
probably you should install postgresql-devel first
yum -y install postgresql-devel

Resources