apt --fix-broken install does not work, package manager broken after installing wine-stable - package-managers

after uninstalling old version of wine-1.8 and installing it again, I encountered an ERROR in package manager for Broken packages:
Preparing to unpack .../libwine_3.0-1ubuntu1_amd64.deb ...
Unpacking libwine:amd64 (3.0-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-amd64 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libwine_3.0-1ubuntu1_i386.deb ...
Unpacking libwine:i386 (3.0-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb (--unpack):
trying to overwrite '/usr/lib/i386-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-i386:i386 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb
/var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I SOLVED this problem with the following solution:
sudo dpkg --force depends -P wine1.8-i386
sudo dpkg --force depends -P wine1.8
sudo dpkg --force depends -P wine1.8-amd64
and finally you need to run this command to fix all broken packages:
sudo apt --fix-broken install
(for more reference check this out.)

Related

Chrome Remote Desktop not installing

It was showing a discrepancy when I tried to install chrome remote desktop for my google cloud compute engine(Ubuntu) through SSH. giving the following msg:
$sudo dpkg --install chrome-remote-desktop_current_amd64.deb
Selecting previously unselected package chrome-remote-desktop.
(Reading database ... 113227 files and directories currently installed.)
Preparing to unpack chrome-remote-desktop_current_amd64.deb ...
Unpacking chrome-remote-desktop (91.0.4472.10) ...
dpkg: dependency problems prevent configuration of chrome-remote-desktop:
chrome-remote-desktop depends on libgbm1 (>= 17.1.0~rc2); however:
Version of libgbm1:amd64 on system is 13.0.6-1+b2.
dpkg: error processing package chrome-remote-desktop (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u12) ...
Errors were encountered while processing:
chrome-remote-desktop
$ sudo apt install --assume-yes --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
chrome-remote-desktop
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 104 MB disk space will be freed.
(Reading database ... 113353 files and directories currently installed.)
Removing chrome-remote-desktop (91.0.4472.10) ...
Looks like you downloaded DEB package for a much newer Ubuntu than you are running. You didn't specify exactly what you are running so I have to only speculate.
The version you are using affects a lot of things, what is the output of the following?
lsb_release -a
On very old distributions you will have a lot problems installing newer out-of-distribution packages.
And I think the remote desktop needs to match the base chrome package, what happens when you run the:
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update
sudo apt install google-chrome-stable
If you want to control your server remotely, did you consider alternatives?
X11 forwarding tunnel with SSH
NoMachine
VNC server (I would still use it through SSH to make it more secure)
TeamViewer

How to fix "Error: failed to commit transactions, snapd: /snap exists in filesystem, no packages were upgraded."?

I'm getting problem in upgrading the manjaro packages. How should I fix this?
sudo pacman -Syu
error: failed to commit transaction (conflicting files)
snapd: /snap exists in filesystem
Errors occurred, no packages were upgraded.
When you want to use snap package, you should not have snapd and snapd-git packages installed.
In your case you have snapd installed. It maybe installed as a dependency along with another package or whatever reason.
You can simply remove snapd package by issuing following command:
sudo pacman -R snapd
Hope it will help you!

Unmet dependencies on Debian

I have unmet dependencies for libapache2-mod-php7.0. In my attempt to fix this issue I have been playing around with my sources and have done a variety of upgrades. I was on Stretch when I started, I know I've probably gone about it the wrong way but I like to try before I ask.
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux stable-updates (sid)
Release: stable-updates
Codename: sid
cat /etc/issue.net
Debian GNU/Linux buster/sid
cat /proc/version
Linux version 3.2.0-4-amd64 (debian-kernel#lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.93-1
apt-get update
apt-get updgrade
...
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin (>= 2.4.16) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt --fix-broken install
...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.29-1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-13+deb7u12
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.29-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get clean
apt-get autoclean
apt-get -f install
...
Unpacking apache2-bin (2.4.25-3+deb9u3) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.25-3+deb9u3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-13+deb7u12
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.25-3+deb9u3_amd64.deb
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg --configure -a
dpkg: dependency problems prevent configuration of libapache2-mod-php7.0:
libapache2-mod-php7.0 depends on apache2-api-20120211; however:
Package apache2-api-20120211 is not installed.
libapache2-mod-php7.0 depends on apache2-bin (>= 2.4.16); however:
Package apache2-bin is not installed.
dpkg: error processing package libapache2-mod-php7.0 (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-4.14.0-1-amd64 (4.14.2-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.14.0-1-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/disk/by-uuid/1cd988f1-4ed7-4bb1-81a5-15f7dc900a47'.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.14.0-1-amd64 (--configure):
installed linux-image-4.14.0-1-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.14.0-1-amd64; however:
Package linux-image-4.14.0-1-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0:
php7.0 depends on libapache2-mod-php7.0 | php7.0-fpm | php7.0-cgi; however:
Package libapache2-mod-php7.0 is not configured yet.
Package php7.0-fpm is not installed.
Package php7.0-cgi is not installed.
dpkg: error processing package php7.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php:
php depends on php7.0; however:
Package php7.0 is not configured yet.
dpkg: error processing package php (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of phpmyadmin:
phpmyadmin depends on php; however:
Package php is not configured yet.
Package php7.0 which provides php is not configured yet.
dpkg: error processing package phpmyadmin (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libapache2-mod-php7.0
linux-image-4.14.0-1-amd64
linux-image-amd64
php7.0
php
phpmyadmin
apt-get -u dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin (>= 2.4.16) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
What else can I try to resolve this?
you need to remove apache
apt-get remove apache2.2-bin
you can force the installation of apache2-bin:
dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.20-2_amd64.deb
and then try
apt-get -f install
for me it worked ;)
Try these steps
1. sudo apt-get update
2. sudo apt-get dist-upgrade
3. apt-get install -f --reinstall apache2
-f to fix unmet dependencies.

Sub-process /usr/bin/dpkg returned an error code (1)- ubuntu

I am trying to install apache:
sudo apt-get install apache2
And i am getting this error:
Setting up google-cloud-sdk (132.0.0-0) ... dpkg: error processing
package google-cloud-sdk (--configure): subprocess installed
post-installation script returned error exit status 1 Errors were
encountered while processing: google-cloud-sdk E: Sub-process
/usr/bin/dpkg returned an error code (1)
Similarly i get th following output when i run sudo dpkg --configure -a:
Setting up google-cloud-sdk (132.0.0-0) ...
dpkg: error processing package google-cloud-sdk (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
google-cloud-sdk
How can i solve this?
Fairly crude solution and might ignore an actual problem, but you can skip the post installation script by putting
exit 0
in the 2nd line of the file
/var/lib/dpkg/info/google-cloud-sdk.postinst
Then rerun
dpkg --configure -a
If you failed to install Java and find this error then use this following instruction:
~$ java -version
~$ javac
checking list
~$ sudo dpkg --list | grep -i jdk
remove java (put your install version e.g. java8)
~$ sudo apt-get purge oracle-java9-installer
then again checking list
~$ sudo dpkg --list | grep -i jdk
For stopping failed download packages:
checking list
~$ sudo dpkg --list | grep -i pakage_name
remove package
~$ sudo apt-get purge package_name
then again checking list
~$ sudo dpkg --list | grep -i package_name

Permission denied when installing RVM

I'm trying to install rvm. I typed:
curl -L https://get.rvm.io | bash -s stable --autolibs=3 --ruby
And I got the below
Updated:
It's working now. My Xcode was not updated.
But now second problem, also permission denied are the packages. It says it can't be installed. Log is shown below,
[2013-05-18 15:37:46] requirements_osx_port_libs_install
---> Computing dependencies for apple-gcc42
---> Dependencies to be installed: cctools ld64 llvm-3.2 gcc_select
---> Building llvm-3.2
Error: org.macports.build for port llvm-3.2 returned: command execution failed
Error: Failed to install llvm-3.2
Please see the log file for port llvm-3.2 for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.2/llvm-3.2/main.log
Error: The following dependencies were not installed: cctools ld64 llvm-3.2 gcc_select
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port apple-gcc42 failed
There were package installation errors, make sure to read the log.
How do I solve this?
Your /usr/local dir is locked to (probably) root. To solve this run this line:
sudo chown -R `whoami` /usr/local
It will make it writable for you. That can be an issue but usually it should be not.