How do I fix flatpak remote errors? - ubuntu-18.04

I installed flatpak via the command lines on their website and then proceeded to add the remote repository as instructed, but when I try to install something it says to specify a remote. I was trying to install inkscape from flathub.
Here are the command lines I used:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
I also tried without sudo
To download the ref file:
wget https://www.flathub.org/apps/details/org.videolan.VLC
To install:
flatpak install org.videolan.VLC
Error Message:
error: REMOTE and REF must be specified

Try:
flatpak install flathub org.videolan.VLC
"flathub" is the name of the missing REMOTE you added in your first step.

Related

php7.4 in ubuntu 21.10: apache2 fails to start

I try to run php7.4 in ubuntu 21.10 but I get this error.
apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
Missing libphp7.4.so
I installed libphp7.4-embed but the problem persists. The files are installed in /usr/lib/ not in /usr/lib/apache2/modules/. Symbolic link did not help (undefined symbol: php7_module).
How to make php7.4 run in ubuntu 21.10?
I try some commands
$ sudo a2enconf php7.4-fpm
Conf php7.4-fpm already enabled
$ sudo a2enmod php7.4-fpm
ERROR: Module php7.4-fpm does not exist!
Both OP and #Andrew have pieced together a good solution, but since I just had to do this, let me put it all together, with a few extra clarification steps.
First: What version of PHP do you have now / will you use?
php -v
Returns PHP 8.1.2 so 8.1 in my case.
Next, disable the existing apache2 module that was giving you trouble:
sudo a2dismod php7.4
Finally, enable the one you found above:
sudo a2enmod php8.1
Restart apache2 and you're all set.
sudo systemctl restart apache2
after much try and error:
rm /etc/apache2/mods-enabled/php7.4.load
Now it works.
(there is only one php* in mods-enabled: php7.4.conf. I don't know if it matters.)

Oracle JDK 11 error occuring every time, I install anything in terminal

Below is the Error message I get every time I install anything in the terminal . Its kinda stuck there for a while.
I tried no. of solutions from StackOverflow but nothing worked.
Before installing this package,
please download the Oracle JDK 11 .tar.gz file
with the same version as this package (version 11.0.4),
and place it in /var/cache/oracle-jdk11-installer-local,
E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.4_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
installed oracle-java11-installer-local package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
oracle-java11-installer-local
E: Sub-process /usr/bin/dpkg returned an error code (1)
Doesn't show up again.
Remove the package oracle-java11-installer-local. You can do this in following way:
sudo apt remove oracle-java11-installer-local
found this solution:
sudo rm /var/lib/dpkg/info/oracle-java11-installer-local.postinst
at this site.
You need to download the folder of the Oracle JDK 11 on here https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
After download the tar.gz file. Move to your folder location then copy the file by using this command
sudo cp jdk-11.0.6_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
don't forget to check your file name! After that repeat again by typing
sudo apt-get install oracle-java11-installer-local
and you can check your java version after that by typing
java -version
Hello,
I've had the same issue.
When you try to run sudo apt update && sudo apt upgrade it will automatically try to update the Java if a newer version is available. In my case let's say from 11.0.4 -> 11.0.5.
If you add the JDK from Oracle (after download) to /var/cache/oracle-jdk11-installer-local/ it should work.
You don't have to uninstall it...(I mean the oracle-jdk11-installer-local, it works just fine).
Please let me know if you still have this issue.
I had the same issue. My solution was to download jdk-11.0.5_linux-x64_bin.tar.gz and copied it to /var/cache/oracle-jdk11-installer-local.
In console shell, type:
sudo apt update && sudo apt upgrade
After a long search: this solved it for me.
The checksum made the issues for me. Try:
sudo rm /var/lib/dpkg/info/oracle-java11-installer-local.postinst -f
Navigating to the directory var/cache and doing "sudo rmdir oracle-jdk11-installer-local/" worked for me.
sudo rmdir oracle-jdk11-installer-local/
I have managed to resolve the issue by doing this:
modify /var/lib/dpkg/info/oracle-java11-installer-local.postinst
Change the checkSum. take from oracle website check sum for 11.0.15.1
3. change the version in 2 places
4. save and update apt
5. then sudo apt install oracle-java11-installer-local
this worked for me

Apache start libphp7.3.so not found

I have Install php 7.3 and apache2 but when I try to start apache2 , I have this error :
service apache2 start
apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.3.load: Cannot load /usr/lib/apache2/modules/libphp7.3.so into server: /usr/lib/apache2/modules/libphp7.3.so: cannot open shared object file: No such file or directory
I really don't know how to resolve this problem, I have tried to remove and reinstall without success.
You're getting that error because the PHP 7.3 library for Apache is not installed.
sudo apt install -y libapache2-mod-php7.3
The above command should fix it.
It solved my problem:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3
sudo apt-get install php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-mysql php7.3-mbstring php7.3-zip php7.3-fpm php7.3-intl php7.3-simplexml
sudo service apache2 restart
For me the problem was that I did not install apache tools for php.
On arch linux:
yaourt -S php-apache
After that, module appeared in the folder.
The best way not to make a mistake is to follow guide: https://wiki.archlinux.org/title/Apache_HTTP_Server#PHP

error: import pychart , during install source code odoo 9.0

I wrote so many thing in requirements.txt and reinstalled but it didn't work out. I installed odoo 9.0 source code for windows. The command prompt is showing error:
from pychart import *
What do I need to write in requirements.txt for pychart?
As i just ran into the same problem unrelated to odoo.
The following command solved it for me:
pip install Python-Chart
To install the python packages for odoo you can use below command found from this detailed odoo install guide
cd /tmp && wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt && sudo pip install -r requirements.txt
It will install all the python dependacy in just one command.
Hope this helps.
You have to install that package before you use that, If are on ubuntu command is pip install pychart and if you are on windows the command is c:\Python27\Scripts\pip.exe install pychart.I assume you have installed python on default folder c drive.
Why don't you create a module like install_module and on depends you can add required list of module to install. If you install that module it'll automatically install all depended module. I'm using this same. Instead of command prompt it'll be quite easy too. You can view the depends module list in Technical Data of that install_modules.
I Hope it'll be helpful.

Can deb packages from one machine be installed in another?

Install python-netinterfaces on machine1 using apt-get
Copy the python-interfaces deb package cached in /var/cache/apt/archive from machine to machine2
Change the /etc/apt/sources.list to point to the directory where the package is copied in machine2
Run teh following command
sudo apt-get install python-interfaces
It inturn tries to install python-chardet-whl
and I get the error
warning: the following packages cannot be authenticated!
If I install the python-chardlet-whl from command line it fails with the authentication error message. however, it passes with --force-yes message.
I searched in the web for solutions and tried some suggestions like apt-key update, but nothing worked.
Is it possible to install package installed from one machine in another?
note: Both have same hardware and OS/other-software is installed is same
Are you sure destination machine has same repository list as source machine?
apt-cache showpkg python-chardet-whl
After adding repository to destination machine it would show you repository that package belongs to
Then you need to run:
sudo apt-get update
To update the repository list, by doing this you problem should fix
Also make sure that package does not need any dependency that is not installed on the system.

Resources