This is error code I get. I'm using mint Debian edition
apt-get install libaio-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libaio-dev
0 upgraded, 1 newly installed, 0 to remove and 983 not upgraded.
18 not fully installed or removed.
N eed to get 0 B/25.5 kB of archives.
After this operation, 143 kB of additional disk space will be used.
(Reading database ... 170878 files and directories currently installed.)
Unpacking libaio-dev (from .../libaio-dev_0.3.109-2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libaio-dev_0.3.109-2_amd64.deb (--unpack):
trying to overwrite '/usr/share/man/man2/io_getevents.2.gz', which is also in package manpages-dev 3.28-1
configured to not write apport reports
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/libaio-dev_0.3.109-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get remove manpages-dev
sudo apt-get install libaio-dev manpages-dev
Related
I have a system that is due to be upgraded but I'm having conflicts with apt-get -f install:
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
login sysvinit-utils util-linux
Suggested packages:
kbd util-linux-locales
The following packages will be upgraded:
login sysvinit-utils util-linux
3 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1775 kB of archives.
After this operation, 1886 kB of additional disk space will be used.
Do you want to continue? [Y/n]
E: Sub-process false returned an error code (1)
E: Prior errors apply to /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/util-linux_2.36.1-8_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/login_1%3a4.8.1-1_arm64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 9765 files and directories currently installed.)
Preparing to unpack .../sysvinit-utils_2.96-7_arm64.deb ...
Unpacking sysvinit-utils (2.96-7) over (2.88dsf-59) ...
dpkg: error processing archive /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb (--unpack):
trying to overwrite '/lib/init/vars.sh', which is also in package initscripts 2.88dsf-59
Errors were encountered while processing:
/var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't understand why it says E: Sub-process false returned an error code (1) after I confirm installation of the packages. Can anyone help me with this?
initscripts is a purely virtual package, so it is safe to give dpkg permission to overwrite it. Open the terminal and type:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
If you're not using dpkg directly and using an apt front-end like apt or apt-get, the following command defines the same custom dpkg option to use as the previous command.
sudo apt-get -o Dpkg::Options::="--force-overwrite" install sysvinit-utils
Try to flush the cache and reinstall then :
apt autoremove
apt clean
apt autoclean
apt update
apt install -f
if it doesn't help, try to remove the problematic packages and reinstall them normally.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
python3-cairo python3-gi-cairo
The following packages will be upgraded:
ca-certificates dpkg dpkg-dev file libcups2 libcupsimage2 libdpkg-perl
libexiv2-14 libfaad2 libgs9 libgs9-common libmagic-mgc libmagic1
libpam-systemd libsoup-gnome2.4-1 libsoup2.4-1 libsystemd0 libudev1 patch
sense-emu-tools shared-mime-info systemd systemd-sysv tzdata udev
25 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,650 kB/19.2 MB of archives.
After this operation, 471 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspbian.org/raspbian stretch/main armhf dpkg armhf 1.18.25 [2,055 kB]
Get:2 http://archive.raspbian.org/raspbian stretch/main armhf dpkg-dev all 1.18.25 [1,595 kB]
Fetched 3,650 kB in 11s (311 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 116530 files and directories currently installed.)
Preparing to unpack .../dpkg_1.18.25_armhf.deb ...
Unpacking dpkg (1.18.25) over (1.18.24) ...
dpkg: error processing archive /var/cache/apt/archives/dpkg_1.18.25_armhf.deb (--unpack):
unable to stat './usr/share/man/de' (which I was about to install): Structure needs cleaning
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/dpkg_1.18.25_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am on Ubuntu 17.10, freshly installed and tried to installed Ruby using apt-get install ruby-full. It failed to install and now aptitude says
The following packages have unmet dependencies:
ri: Depends: ruby2.3-doc but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specifiy a solution).
I tried the suggested command as well as sudo apt-get install -f -y to no avail: It begins the install process then tells me there was an error processing the ruby2.3-doc archive
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
ruby2.3-doc
The following NEW packages will be installed:
ruby2.3-doc
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
21 not fully installed or removed.
Need to get 0 B/3,382 kB of archives.
After this operation, 27.7 MB of additional disk space will be used.
(Reading database ... 182724 files and directories currently installed.)
Preparing to unpack .../ruby2.3-doc_2.3.3-1ubuntu1_all.deb ...
Unpacking ruby2.3-doc (2.3.3-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/ruby2.3-doc_2.3.3-1ubuntu1_all.deb (--unpack):
unable to open '/usr/share/ri/2.3.0/system/page-ChangeLog-2_1_0.ri.dpkg->new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/ruby2.3-doc_2.3.3-1ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried clearing aptitude's cache in case a package failed to download correctly but that did not fix it.
Because this means there are unmet dependencies, I'm unable to run other aptitude operations to try and install new packages or remove ruby-full.
How can I remove this ruby-full package so I can try again using rvm?
I ended up removing ri, ruby-full, and the other packages mentioned then ran apt-get update.
I am not sure i I need to ask this here.
I trying to install php5-gd with this command
sudo apt-get install php5-gd
But, system says that there is no this package
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed: php5-gd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 28,3 kB of archives.
After this operation, 163 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated!
php5-gd Install these packages without verification? [y/N] Y
Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-gd amd64 5.6.23+dfsg-1+deprecated+dontuse+deb.sury.org~trusty+1 404 Not Found [IP: 91.189.95.83 80] E: Failed to fetch
http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/pool/main/p/php5/php5-gd_5.6.23+dfsg-1+deprecated+dontuse+deb.sury.org~trusty+1_amd64.deb 404 Not Found [IP: 91.189.95.83 80]111
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
I tried also --fix-mising but still no progress.
The repository is outdated, follow this guide on how to update it: https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php#compatibility-php5--packages
MongoDB did not install correctly because of some Dpkg errors. Trying to purge or remove
anything related just comes with the error. I have tried deleting all of the Mongodb libs and did a search for other files. I am not sure what caused the original error or how to get the system back to a workable state:
Setting up mongodb-org-server (2.6.5) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is the original installation command
$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 MB of archives.
After this operation, 290 MB of additional disk space will be used.
Get:1 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- shell amd64 2.6.5 [4,458 kB]
Get:2 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- server amd64 2.6.5 [9,446 kB]
Get:3 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- mongos amd64 2.6.5 [7,175 kB]
Get:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- tools amd64 2.6.5 [93.7 MB]
Get:5 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org amd64 2.6.5 [3,656 B]
Fetched 115 MB in 4min 20s (441 kB/s)
Selecting previously unselected package mongodb-org-shell.
(Reading database ... 165525 files and directories currently installed.)
Unpacking mongodb-org-shell (from .../mongodb-org-shell_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-server.
Unpacking mongodb-org-server (from .../mongodb-org-server_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-mongos.
Unpacking mongodb-org-mongos (from .../mongodb-org-mongos_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-tools.
Unpacking mongodb-org-tools (from .../mongodb-org-tools_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org.
Unpacking mongodb-org (from .../mongodb-org_2.6.5_amd64.deb) ...
Processing triggers for man-db ...
Setting up mongodb-org-shell (2.6.5) ...
Setting up mongodb-org-server (2.6.5) ...
Adding system user `mongodb' (UID 120) ...
Adding new user `mongodb' (UID 120) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 126) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Setting up mongodb-org-mongos (2.6.5) ...
Setting up mongodb-org-tools (2.6.5) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try using this init script.
init.d
If you previously installed MongoDB, uninstall it first.
To delete МongoDB.
sudo apt-get remove mongodb-10gen
After that delete confing files and init scripts
sudo find /etc/ | grep mongod.* | xargs rm -rf
sudo find /usr/bin/ | grep mongod.* | xargs rm -rf
sudo find /var/lib/ | grep mongod.* | xargs rm -rf
Warning!
/var/lib/ may contain your databases.
Install MongoDB
There are
apt-get autoremove
apt-get -f install
worthy to try first, if it doesn't work, actually I have mongodb-org-server in half-configure and no regular way to remove.
Then I found a worst solution which is to remove package status block. But you will lose track of the real package state and leave trash in your system.
So I check the error message we have, and I found this line interesting:
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
Then I create a empty file to fool the invoke function.
touch /etc/init.d/mongod
And then try apt-get autoremove again and apt-get remove the package successfully!
Run this code
touch /etc/init.d/mongod
and then follow that link
https://community.c9.io/t/setting-up-mongodb/1717
Note: (--rest) is removed in latest release of mongo.