Author Archives: LinuxTech

E: Unable to locate package Ubuntu

While trying to install some new software in Ubuntu I was getting error

E: Unable to locate package Ubuntu

I tried updating using command sudo apt-get update

However it didnt work

sudo apt-get install anydesk_2.9.1-1_amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package anydesk_2.9.1-1_amd64.deb
E: Couldn’t find any package by glob ‘anydesk_2.9.1-1_amd64.deb’
E: Couldn’t find any package by regex ‘anydesk_2.9.1-1_amd64.deb’
home@home:~/Desktop/shraddha$ cd ..

 

You need to use command  sudo dpkg –install    filename.deb to get this installed

 

sudo dpkg –install anydesk_2.9.1-1_amd64.deb
Selecting previously unselected package anydesk.
(Reading database … 247265 files and directories currently installed.)
Preparing to unpack anydesk_2.9.1-1_amd64.deb …
Unpacking anydesk (2.9.1-1) …
Setting up anydesk (2.9.1-1) …
Processing triggers for gnome-menus (3.13.3-6ubuntu3) …
Processing triggers for desktop-file-utils (0.22-1ubuntu5) …
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) …
Rebuilding /usr/share/applications/bamf-2.index…
Processing triggers for mime-support (3.59ubuntu1) …
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) …
Processing triggers for man-db (2.7.5-1) …

 

 

 

 

IDN Addon Domain Issue

We had been working on adding an IDN addon domain in cPanel and received invalid domain name.

Internationalized domain name – Wikipedia
An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in software applications, in whole or in part, in a language-specific script or alphabet

Domain cannot be added directly in cPanel because domain contains at least one label

Domain Name : lamé.com

We need to use below converter to convert the IDN to ASCII

http://idna-converter.com/?decoded=lam%C3%A9.com&encoded=&doencode=Encode+%3E%3E

Unicode url/domain: lamé.com

ASCII/Punycode (ACE) : xn--lam-dma.com

Once domain is converted in ASC can be added in cPanel.

 

***** FATAL: Failed to download updatenow.static from server: The system cannot update the /var/cpanel/sysinfo.config file. at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 115.

While trying to upgrade cpanel  to new version was getting error

FATAL: Failed to download updatenow.static from server:

The issue was due to corrupt RPM

I used the below fix to resolve this issue


mkdir /root/old_rpm_dbs/

Now move the original RPMs to the new folder

mv /var/lib/rpm/__db* /root/old_rpm_dbs/

Finally rebuild the RPM database

rpm --rebuilddb

Now you can force an update of the cPanel server and it should work again.

/scripts/upcp -force

Failed to connect 1006 VNC virtualizor

While working on one of the nodes which has Virtualizor Software was facing issues accessing VNC . giving error failed to connected 1006

The issue was due to Virtualizor upgrade

Below is the command you need to execute to kill all process using below command for VNC to work

[root@os1126 ~]# kill $(pgrep -f “/usr/local/virtualizor/enduser/themes/default/novnc/utils/websockify”)
[root@os1126 ~]# kill $(pgrep -f “/usr/local/virtualizor/enduser/themes/default/novnc/utils/websockify”)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]

Now after retrying accessing virtualizor I can see it working fine

“chown: Invalid username: root:Disk”

The server was not allowing login to server even when ssh keys were saved

On rebooting server I could see it and error on screen “chown: Invalid username: root:Disk”

On troubleshooting found error to be due to corruption of /etc/passwd  as this is where all users are saved and due to corruption the user  root was missing in  /etc/passwd

So I got the serve in single user mode and fastboot as only single user mode wont server and would restart

Once I got access to single user I just moved the /etc/passwd to /etc/passwd.bkp and  copied  /etc/paswd.OLD which was in  /etc to /etc/passwd

Now on rebooting server i can see it working fine. 🙂

Parse html as PHP is easyapache 4

 

Normal rule in .htaccess to parse html files as php on easyapache 3 are not working on easyapache 4

#AddType application/x-httpd-php .php .htm .html

#<FilesMatch “\.(htm|html|php)$”>
#SetHandler application/x-httpd-php56
#</FilesMatch>

 

Below is the code which will need to be added In cpanel, multiphp manager will add the following for force a specific
version of php:

# php — BEGIN cPanel-generated handler, do not edit
# Set the “ea-php54” package as the default “PHP” programming language.

AddType application/x-httpd-ea-php54 .php .php5 .phtml

# php — END cPanel-generated handler, do not edit

Make sure the AddType and the selected php version matches! So there we go, simple when you know how.

 

 

DNS error bad owner name (check-names) /tmp/cpanel

While working with one client I was getting below error in DNS

DNS error bad owner name (check-names) /tmp/cpanel

So I went ahead and checked DNS zone file using below command

 

root@vps [/var/named]# named-checkzone onlinecsource.com /var/named/onlinesource.com.db
/var/named/onlinesource.com.db:56: _autodiscover._tcp.cheapsalesleads.onlinesource.com: bad owner name (check-names)
/var/named/onlinesource.com.db:57: _autodiscover._tcp.cheapsalesleads.onlinesource.com: bad owner name (check-names)
zone onlinesource.com/IN: loaded serial 2017030209
OK

So the error pointed to line 56 and 57 in zone file

Went ahead and deleted the line 56 and 57 and reload DNS zone file

All works good now