apt-get broken after ubuntu upgrade to 14.04 - linux

I upgraded ubuntu from version 12.04 to 14.04 and now I get several system errors when I log in and in a terminal I get this:
$ sudo apt-get upgrade
Segmentation fault (core dumped)
$ sudo dpkg --configure -a
Segmentation fault (core dumped)
...
Update: I can't run rm with sudo:
$ sudo rm filename.txt
Segmentation fault (core dumped)

So I found the answer:
I had to reboot in recovery mode as root and do:
dpkg --remove --force-remove-reinstreq libpam-smbpass
Then
apt-get install -f
then I had to move some files to make it go through. There were some conflicts with samba packages that broke sudo...

Related

dpkg fails on Ubuntu Server 22.04 LTS

My Ubuntu 22.04 LTS seems to have problems with dpkg and I can't find anyone online that has the same issue as me. It makes me not able to install packages and I just don't know how to fix this.
Setting up dpkg (1.21.1ubuntu2.1) ...
head: error reading 'info_silent': Is a directory
dpkg: error processing package dpkg (--configure):
installed dpkg package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dpkg
E: Sub-process /usr/bin/dpkg returned an error code (1)
My Ubuntu Server version:
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
I've read that a reinstall is an option, but I also can't find a good way to reinstall LTS without losing my data.
I finally got this fixed, I found a YouTube video that fixed my issue.
These are the commands that fixed my problem:
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get -f install
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_silent
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_silent /var/lib/dpkg/info

Install Julia >v1.1.1 on Raspberry Pi Zero W

I'm trying to use the PortAudio package in Julia on a Raspberry Pi Zero W running Raspberry Pi OS like so:
using Pkg
Pkg.add("PortAudio")
This fails with the error:
ERROR: Unsatisfiable requirements detected for package PortAudio [80ea8bcb]:
PortAudio [80ea8bcb] log:
├─possible versions are: 1.1.1-1.1.2 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 1.1.1-1.1.2
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
The version of Julia in apt is v1.0.3, which explains the above error. So I'm trying to install the latest version of Julia. The pre-compiled binaries won't run (Illegal instruction error) so I'm trying to compile it following the instructions from here:
sudo apt-get -y update
sudo apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config libopenblas-dev git ccache
I then added this to /etc/dphys-swapfile
CONF_SWAPSIZE=8192
CONF_MAXSWAP=8192
Then
git clone https://github.com/JuliaLang/julia.git
cd julia
git checkout v1.6.2
make
This fails with this error:
Illegal instruction
make[1]: *** [Makefile:222: julia_flisp.boot] Error 132
make: *** [Makefile:43: julia_flisp.boot.inc.phony] Error 2
I think the issue here is that you need to tell it which ARM CPU the Pi uses, so following these instructions and this thread I added this to Make.user:
JULIA_CPU_TARGET=arm1176jzf-s
USE_BINARYBUILDER=0
But I get the same error, albeit with a suggestion to try make -C deps clean-openblas and rebuild with make OPENBLAS_USE_THREAD=0 or make OPENBLAS_TARGET_ARCH=NEHALEM. Neither fixes the problem. Also tried this python script (error downloading julia-1.6-latest ) and these instructions to install via docker (standard_init_linux.go:228: exec user process caused: exec format error) but could not get either to work.
I've tried absolutely everything I can find online. Someone please help! How do I install a recent version (>v1.1.1) of Julia on a Pi Zero?
I did it! Code quoted from this website:
yourmainPC $ ssh pi#raspberrypi.local # Assume You are going to login to your Pi via SSH
pi#raspberrypi $ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
pi#raspberrypi $ sudo gpasswd -a $USER docker # if you like to skip `sudo`
pi#raspberrypi $ exit
yourmainPC $ ssh pi#raspberrypi.local # login again
pi#raspberrypi $ JL_VERSION=v1.5.1
pi#raspberrypi $ IMAGE_NAME=terasakisatoshi/jlcross:rpizero-${JL_VERSION}
pi#raspberrypi $ CONTAINER_NAME=jltmp_${JL_VERSION}
pi#raspberrypi $ docker run --name ${CONTAINER_NAME} $IMAGE_NAME /bin/bash
pi#raspberrypi $ docker cp ${CONTAINER_NAME}:/home/pi/julia-${JL_VERSION} .
pi#raspberrypi $ docker rm ${CONTAINER_NAME}
pi#raspberrypi $ ls
julia-v1.5.1 # <---- this is it
pi#raspberrypi $ cd julia-v1.5.1/bin
pi#raspberrypi $ ./julia # tada!!!

gnome-terminal not opening after library installation. ERROR: FT_Get_Var_Design_Coordinates

I am using Ubuntu 20.04 and tried to install the Python version of Tecplot (Pytecplot), after which I'm unable to open the terminal anymore.
$ gnome-terminal
/usr/bin/gnome-terminal.real: symbol lookup error: /lib/x86_64-linux-gnu/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates
My Bash_history shows following commands:
python3 setup.py install
sudo python3 setup.py install
sudo apt-get install libjpeg62:i386
sudo apt update sudo apt install libpng12-0
sudo cp libjpeg.so.62 ../
sudo cp libjpeg.so.62 ../../local/lib/
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
I made a backup of usr/local/lib before starting, but restoring that backup did not solve the problem.
Can someone help me in solving the above issue?

execv error when using a toolchain

I'm getting this error when I try to compile a small helloworld c file:
/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/arm-none-linux-gnueabi-gcc -DARCH_ARM -o hello.c.o -c hello.c
arm-none-linux-gnueabi-gcc: error trying to exec '/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.0/../../../../arm-none-linux-gnueabi/bin/as': execv: No such file or directory
I am running ubuntu 14.04 lts ... I see that I have exec command but there is no execv on my ubuntu. what is execv ?
Thanks
The issue was caused by missing 32 bit libraries from my Ubuntu 14.04 64 bit.
To solve this I had to install:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

Quartus 13.1 installer giving segmentation fault (core dumped)

I'm trying to install Quartus 13.1 on my Xubuntu 14.04 64-bit edition. The downloaded file is a .run installer, which I make executable by executing:
sudo chmod +x installer.run
./installer
Which gives a segmentation fault (core dumped) message.
I'm posting here because the Altera forums are useless, unfortunately.
Have you try to install these packages ?
sudo apt-get install libstdc++5 libmotif4 libxp6 libcurl3
And lauching it with bash command directly :
$ bash installer

Resources