Switch raspbian to 64bit - raspbian

I switched my raspian to 64bit by adding arm_64bit=1 to /boot/config.txt. It worked in that sense, that the kernel now is 64bit.
When I want to install packages (docker in my case), I want to use it the 64bit version, but it installs the 32bit version. As it turns out, the package manager still is set to 32bit:
$ dpkg --print-architecture
armhf
How can I make the package manager install 64bit packages?

$ dpkg --print-architecture
i386
# dpkg --add-architecture arm64
$ dpkg --print-foreign-architectures
amd64
# apt-get update
# apt-get download gcc-4.6-base:arm64 libgcc1:arm64 libc6:arm64 \
libselinux1:arm64 zlib1g:arm64 libbz2-1.0:arm64 dpkg:arm64
# dpkg -i gcc-4.6-base*.deb libgcc*.deb libc*.deb libselinux*.deb \
libbz2*.deb zlib*.deb dpkg*.deb
$ dpkg --print-architecture
arm64
$ dpkg --print-foreign-architectures
i386
Some of your packages are then amd64, but most will remain i386. apt-get upgrade will take care of some packages, apt-get -f install will repair some of errors, but still most packages will remain i386. If you want to cope with this, then skip the tricky part ;)
Using dpkg --get-selections | grep :i386 will return all your packages, that you will still have to migrate.
My next idea was to do:
# apt-get install `dpkg --get-selections \
| grep i386 \
| awk {'gsub(/:i386/, ":amd64"); print $1'}`
But it turned out to be a bad idea: some packages are not available in amd64 (e.g. libc6-i686), apt-get will be confused, and a lot of packages will be installed in both versions. A lot of manual work in aptitude is to be done.

Related

how to install python-gtk2 debian arm64 on kali?

I downloaded amd64 but it doesn't work for my system and I can't find how to download arm64
And then how to start Zenmap?
I am using mac air m2
And I'm trying to use Zenmap on Kali Linux.
So I
apt search zenmap
sudo apt install zenmap. -y
zenmap start
I entered the commands in order
And got the error below
Could not import the zenmapGUI.App module: 'No module named gtk'
If you installed Zenmap in another directory, you may have to add the modules directory to the PYTHONPATH enviroment variable.
So I entered the command below to download python-gtk2 debian
sudo apt update
sudo apt-get install alien dpkg-dev debhelper build-essential
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
chmod 777 python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
dpkg -I python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
I ran the last command above and got an error
The architecture of the package (amd64) does not match the system (arm64)
I got the error above, so I tried changing amd to arm, but it didn't connect.
How to download arm64 package?
Yes, it means that you need to find an arm package of the python-gtk.
I'm here with the same issue. M1 chip, Parrot in a VM and trying to get zenmap to work. :(

Installing libapache2-mod-php7.1

I installed Apache 2.4.27 and PHP 7.1.7 from source, but I don't find a tip about how to install libapache2-mod-php7.1 or the required module.
How can I install libapache2-mod-php7.1 (or similar) to Apache 2 located under /user/local/apache2?
I have to install it on Debian 8.8 Jessie.
Basically it should be installed during installation of PHP:
sudo apt-get install php7.1
...
The following NEW packages will be installed:
libapache2-mod-php7.1 libssl1.0.2 php-common php7.1 php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-readline
So first check if it is already installed:
dpkg -l | grep libapache2-mod-php7.1
ii libapache2-mod-php7.1 7.1.7.retag-1+0~20170711133844.5+jessie~1.gbp5284f4 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
In case it is not installed the following command should work fine:
sudo apt-get install libapache2-mod-php7.1
If it will fail check if it is available in repo:
apt-get update
apt-cache search libapache2-mod-php7.1
I used deb.sury.org for php 7.1:
apt-get install apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ jessie main" > /etc/apt/sources.list.d/php.list
apt-get update

Phalcon install give error on ubuntu [duplicate]

I'm just finished installing Ubuntu 13.10.
I want try Phalcon, and when I build the source (phalcon.so), I have this error :
from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
#include "pcre.h"
^
compilation terminated.
make: *** [phalcon.lo] Erreur 1
My installation of lamp is :
sudo apt-get install -y apache2 php5 mysql-server libapache2-mod-php5
php5-mysql php5-curl php5-imagick php5-mcrypt php5-memcache
php5-sqlite php5-xdebug php-apc php5-intl php-mongo php5-dev gcc
Can anybody help me ?
The latest version of Phalcon uses PCRE libraries.
You can install them like so:
sudo apt-get install libpcre3-dev
and then try and install Phalcon again
For CentOS you will need to use
sudo yum install pcre-devel
Credits: #xgretsch
For Mac you can use
brew install pcre
Credits #Brandon Romano
For Mac without brew
Go to https://www.pcre.org/ and download latest pcre:,
tar -xzvf pcre-8.42.tar.gz
cd pcre-8.42
./configure --prefix=/usr/local/pcre-8.42
make
make install
ln -s /usr/local/pcre-8.42 /usr/sbin/pcre
ln -s /usr/local/pcre-8.42/include/pcre.h /usr/include/pcre.h
Credits #user1377324
For mac osx maverick you can use
brew install pcre
if it gives you error, you can use
sudo ln -s /opt/local/include/pcre.h /usr/include/
sudo pecl install apc
I have installed pcre via homebrew in Big Sur, so linked as:
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
To include pcre.h file, search the package archives for the pcre.h file.
To do this I use a command called apt-file (
apt-get install apt-file
and
apt-file update
if you don’t have it installed).
Then search for the pcre package:
apt-file search -x "/pcre.h$"
The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:
kannel-dev: /usr/include/kannel/gwlib/pcre.h
libajax6-dev: /usr/include/ajax/pcre.h
libpcre3-dev: /usr/include/pcre.h
The last one is the one I want:
apt-get install libpcre3-dev
This will solve the problem with pcre.h file compilation problem. Hope it will help others, who may come to find an answer to this thread.
For MacOS monterey amd64 (darwin), it is necessary to create a symlink.
First, locate where the pcre.h was installed by Brew:
$ brew list pcre | grep 'pcre\.h$'
/opt/homebrew/Cellar/pcre/8.45/include/pcre.h
Then, gets the directory that GCC is looking for header (.h) files:
$ cpp -v
...
#include <...> search starts here:
/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include # <---- we are going to use this one
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
Finally, create a symlink to the pcre.h file, so that GCC will find it in its search path:
ln -s /opt/homebrew/Cellar/pcre/8.45/include/pcre.h \
/Library/Developer/CommandLineTools/usr/include/pcre.h
To test if it worked, we can use the following C code:
#include <stdio.h>
#include <pcre.h>
int main() {
printf("lala popo");
return 0;
}
And run:
gcc test.c -o test
πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰
Using macOS Monterey 12.6 on an M1 Pro MacBook Pro, here are the steps necessary to install outh extension for PHP 8.1 using brew:
brew install pcre
brew install pcre2
sudo ln -s /opt/homebrew/include/pcre.h /usr/local/include/
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
sudo pecl install oauth

yum search for 'libcli-dev' on Centos 6.4

I'm compiling a 32bit binary (-m32) on Centos6.4 (64 bit). But yum couldn't find 'libcli-dev' for both of i386, i686 or x86. Which repo I should include to get Yum get these packages?
I loaded them manually through 'rpm':
I got them from:
http://pkgs.repoforge.org/libcli/
But I still would like to know the correct repo. Thanks
RepoForge [formerly RPMForge] has it:
http://repoforge.org/use/
$ wget <url>
$ sudo rpm -ivh rpmforge-release-*.rpm
$ sudo yum update

YUM Package Depends on uname -m or uname -i

I have been trying to install libstdc++ packages using yum thru shell script in my customer's machines. I need to confirm whether yum will list i686 or i386 package in user machine, i mean will yum check for 'uname -p' - processor info or 'uname -i' - hardware platform ..?
As far as i have Checked , yum seems to be depeneds on processor architecture, uname -p.