Issue updating packages to update OS - Raspian - sqlite

Running a pihole on a currently unsupported OS (Raspian 9). I attempted to run a distro upgrade:
apt dist-upgrade -y
However it told me there was an issue with two dependencies:
The following packages have unmet dependencies:
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb9u1 is installed
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is installed
I tried running the recommended fix:
'apt --fix-broken install'
Resulting in:
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>:
invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
Traceback (most recent call last):
File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
output = subprocess.check_output(command)
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dpkg-deb', '-f',
'/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb', 'Package', 'Source',
'Version', 'Architecture', 'Status']' returned non-zero exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 243, in <module>
main(config)
File "/usr/bin/apt-listchanges", line 101, in main
pkg = DebianFiles.Package(deb)
File "/usr/share/apt-listchanges/DebianFiles.py", line 215, in __init__
parser.readdeb(self.path)
File "/usr/share/apt-listchanges/DebianFiles.py", line 128, in readdeb
{'what': file, 'errmsg': str(ex)}) from ex
NameError: name 'file' is not defined
E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg: warning: files list file for package 'libsqlite3-0:armhf' missing; assuming package
has no files currently installed
(Reading database ... 134985 files and directories currently installed.)
Preparing to unpack .../libfreetype6_2.6.3-3.2+deb9u2_armhf.deb ...
Unpacking libfreetype6:armhf (2.6.3-3.2+deb9u2) over (2.6.3-3.2+deb9u1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libfreetype6_2.6.3-
3.2+deb9u2_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3' to
'/usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3.dpkg-new': unexpected end of file or stream
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libfreetype6_2.6.3-3.2+deb9u2_armhf.deb
/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I attempted the following:
Reconfigure dpkg database
sudo dpkg --configure -a
Force install the software
sudo apt-get install -f
Remove software package
sudo apt-get remove --purge package_name
Remove and overwrite
sudo ls -l /var/lib/dpkg/info | grep -i package_name
sudo mv /var/lib/dpkg/info/package_name.* /tmp
sudo apt-get update
sudo dpkg -i --force-overwrite /var/cache/apt/archives/full_name_of_package
None of this worked.
I tried just manually updating the packages and received dependency errors - the issue is trying to update one results in a dependency error for the other and vice versa:
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is to b e installed
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb 9u1 is to be installed
Any idea how to update these two packages when I they apparently require the other one to be updated to update themselves?
Thanks!

Related

pip install ngrok ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

im trying to pip install ngrok but i got the error.
i use ubuntu server
I haven't been able to solve it for hours :(
please help me
pip install ngrok
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Collecting ngrok
Using cached ngrok-0.1.6.tar.gz (3.5 kB)
Collecting ping
Using cached ping-0.2.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qanhr0lu/ping/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qanhr0lu/ping/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-qanhr0lu/ping/pip-egg-info
cwd: /tmp/pip-install-qanhr0lu/ping/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qanhr0lu/ping/setup.py", line 23, in <module>
from ping import __version__
File "/tmp/pip-install-qanhr0lu/ping/ping.py", line 196
except socket.error, (errno, msg):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm not sure which python ngrok library you are trying to install, but I suspect it's probably pyngrok which is installed using: pip install pyngrok
source: https://pyngrok.readthedocs.io/en/latest/index.html

Failed to build bootloader for pyinstaller

I tried to install pyinstaller on BBG with the latest image downloaded from beagleboard.org (Debian 9.5 2018-10-07 4GB SD IoT). After getting errors and suggested by building bootloader manually, I downloaded the pyinstaller 3.4 source and followed the instruction on the pyinstaller docs. I paste the error I extracted from config.log below. Does anyone have idea how to fixed this issue.
I work on Raspberry Pi and BeagleBone quite often. Sometimes I can install pyinstaller simply by typing "pip install pyinstaller". Sometimes I fail and need to build the bootloader manually. I have no idea what actually cause the difference.
Checking for library z
==>
int main(int argc, char **argv) {
(void)argc; (void)argv;
return 0;
}
<==
[1/2] Compiling build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/test.c
['/usr/bin/gcc', '-O2', '-Wdeclaration-after-statement', '-Wimplicit-function-declaration', '-Werror', '-U_FORTIFY_SOURCE', '-D_REENTRANT', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', '-D_FORTIFY_SOURCE=2', '../test.c', '-c', '-o/home/est/pyinstaller-3.4/bootloader/build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/test.c.1.o']
[2/2] Linking build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/testprog
['/usr/bin/gcc', 'test.c.1.o', '-o/home/est/pyinstaller-3.4/bootloader/build/.conf_check_c870da07392f02bfe0dd2ca05dee71ef/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lz']
err: /usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
from /home/est/pyinstaller-3.4/bootloader: Test does not build: Traceback (most recent call last):
File "/home/est/pyinstaller-3.4/bootloader/.waf3-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Configure.py", line 324, in run_build
bld.compile()
File "/home/est/pyinstaller-3.4/bootloader/.waf3-2.0.9-6b5f17f340ec613b295ffa3dedcecc80/waflib/Build.py", line 176, in compile
raise Errors.BuildError(self.producer.error)
waflib.Errors.BuildError: Build failed
-> task in 'testprog' failed with exit status 1 (run with -v to display more information)
not found
from /home/est/pyinstaller-3.4/bootloader: The configuration failed
I think I fixed it. For some reasons I missed "library z" in my system. Reinstall it and then I can reinstall pyinstaller normally. Sorry for wasting your time reading this question.
sudo apt-get install zlib1g-dev
pip3 install pyinstaller

Failed to run custom build command for qmlrs

I'm trying to use the qmlrs Rust bindings to Qt, but I cannot compile. I've installed all dependencies.
Rust 1.9.0
Cargo 0.10.0-nightly (10ddd7d 2016-04-08)
Cargo build log:
error: failed to run custom build command for `qmlrs v0.1.1`
Process didn't exit successfully: `/home/pedro/Documents/repositories
/rust-sample/target/debug/build/qmlrs-e7d90e9b9c603e6f/build-script-
build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=static=qmlrswrapper
cargo:rustc-link-lib=dylib=stdc++
cargo:rustc-link-search=native=/home/pedro/.cargo/registry/src/github.com-
88ac128001ac3a9a/qmlrs-0.1.1/ext/libqmlrswrapper/build
--- stderr
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value:
"`\"pkg-config\" \"--libs\" \"--cflags\" \"Qt5Core Qt5Gui Qt5Qml
Qt5Quick\"` did not exit successfully: exit code: 1\n--- stdout\nPackage
Qt5Qml was not found in the pkg-config search path.\nPerhaps you should
add the directory containing `Qt5Qml.pc\'\nto the PKG_CONFIG_PATH
environment variable\nNo package \'Qt5Qml\' found\nPackage Qt5Quick was
not found in the pkg-config search path.\nPerhaps you should add the
directory containing `Qt5Quick.pc\'\nto the PKG_CONFIG_PATH environment
variable\nNo package \'Qt5Quick\' found\n"', ../src/libcore/result.rs:746
note: Run with `RUST_BACKTRACE=1` for a backtrace.
You should install a Qt's -dev package that provides the file. Here's a hint how you can find relevant package using apt-file (in case you are using Debian-derived distribution).
In your case the error message says
Perhaps you should add the directory containing Qt5Qml.pc, so:
$ sudo apt install apt-file && sudo apt update
$ apt-file search Qt5Qml.pc
>>> qtdeclarative5-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/Qt5Qml.pc
$ sudo apt install qtdeclarative5-dev

R: Compiling issue

I want to compile the R source code on my own.
In order to this, I have installed all the required packages and two more with these commands
sudo apt-get build-dep r-recommended
sudo apt install libicu-dev gobjc-5
Then, I run the usual commands to configure with two additional options
./configure --enable-R-shlib --with-ICU
Until now everything ok, but when I tried to compile with the make command and at a certain point I got these error messages
make[2]: Entering directory '/home/myuser/Downloads/R-3.2.3/src/library/Recommended'
begin installing recommended package MASS
Error in untar2(tarfile, files, list, exdir, restore_times) :
incomplete block on file
Makefile:51: recipe for target 'MASS.ts' failed
make[2]: *** [MASS.ts] Error 1
make[2]: Leaving directory '/home/myuser/Downloads/R-3.2.3/src/library/Recommended'
Makefile:39: recipe for target 'recommended-packages' failed
make[1]: *** [recommended-packages] Error 2
make[1]: Leaving directory '/home/myuser/Downloads/R-3.2.3/src/library/Recommended'
Makefile:77: recipe for target 'stamp-recommended' failed
make: *** [stamp-recommended] Error 2
I have searched online but I haven't been able to figure it out what causes that error.
Thanks in advance.
OS: Ubuntu 15.10 64bit
Briefly:
You probably need apt-get build-dep r-base to get build-dependencies, not apt-get build-dep r-recommended
Your error is from also trying to build recommended packages for which you need an additional download step as explained in the documention
So add --without-recommended-packages to the configure call.

Installing Nginx server

I am trying to install Nginx server on ubuntu using
wget http://nginx.org/download/nginx-1.5.3.tar.gz
tar xvfz nginx-1.5.3.tar.gz
cd nginx-1.5.3
./configure
make
install
this is what I get:
tar: Skipping to next header
gzip: stdin: invalid compressed data--crc error
gzip: stdin: invalid compressed data--length error
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./configure: 10: .: Can't open auto/options
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
What seems to be the problem with all these errors?
You are getting a bunch of tar errors, which might mean that the archive is broken. Try to address those issues first before doing a make.
I would start with replacing tar xvfz nginx-1.5.3.tar.gz
with tar -xvzf nginx-1.5.3.tar.gz
is gzip installed already? check by:
whereis gzip
and install it on ubuntu by:
sudo apt-get install gzip

Resources