dpkg: error processing

I got a same “half-installed package” problem with a package kibana. I got the following error:

dpkg: error processing kibana (--configure):
package kibana is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
  kibana
E: Sub-process /usr/bin/dpkg returned an error code (1)

If anyone is still facing this kind of problem, then you can try this:

sudo rm /var/lib/dpkg/info/kibana*
cd /var/cache/apt/archives
sudo rm kibana*
apt-get --reinstall install kibana

This works for me. You just need to replace the word ‘kibana’ with your half-installed package name.

 

sudo dpkg -i –force-overwrite /var/cache/apt/archives/systemd_229-4ubuntu21.21_amd64.deb

Send mail from smtp.api.createsend.com

ubuntu@ip-172-31-18-246:~$ cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA’s job.
append_dot_mydomain = no

# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.wineconnection.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.wineconnection.com localhost
relayhost = [smtp.api.createsend.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

Email Spam

 G Suite Toolbox Check MX

https://toolbox.googleapps.com/apps/checkmx/check?domain=wineconnection.com&dkim_selector=

 

DKIM is not set up. –DomainKeys Identified Mail (DKIM) standard
DMARC is not set up. – Domain-based Message Authentication, Reporting, and Conformance
There should be a valid SPF record.- Sender Policy Framework (SPF)
Priority of MX records.

Authorize email senders with SPF

https://support.google.com/a/answer/33786?hl=en

https://mediatemple.net/community/products/dv/204404314/how-can-i-create-an-spf-record-for-my-domain

Enhance security for forged spam (DMARC)

https://support.google.com/a/answer/2466580

Add a DMARC record

https://support.google.com/a/answer/2466563?hl=en&ref_topic=2759254

 

 

 

 

 

 

Code Review

You can move this assignment statement before the if statement and use the variable for the if condition and the updateAttributeSet method call.
Move this back on to the previous line. I prefer not having single argument dangling on to the next line, and either everything is on one line, or each argument is on separate lines.
You can use removeAttributeGroup() to replace this statement.
Comments should have a space after //.

Update formatting to:

$installer->updateAttributeSet(
  'catalog_product',
  $extensionAttributeSet->getAttributeSetId(),
  'attribute_set_name', 
  'Magento Extension'
)

 

Install xdebug

View at Medium.com

Troubles –

phpinfo();

Find xdebug config – /etc/php/7.1/apache2/conf.d/20-xdebug.ini

Add config

zend_extension=xdebug.so

xdebug.remote_enable = On
xdebug.idekey = PHPSTORM
xdebug.remote_host = “127.0.0.1”
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.profiler_enable = 0
xdebug.remote_handler = “dbgp”
xdebug.remote_mode = req
xdebug.remote_connect_back = 1

Install debug helper – choose options – choose PHPSTORM ide

chrome-extension://eadndfjplgieldjbigjakmdgkmoaaaoc/options.html

Check if xdebug is working

1) phpinfo() — this will show you all the extensions that are loaded, including xDebug. If it is there, then it’s a safe bet that it’s working.

2) If that isn’t good enough for you, you can try using the var_dump() function. xDebug modifies the output of var_dump() to include additional information. If this is in place, then xDebug is working.

3) xDebug modifies PHP’s error output. If your program crashes with xDebug in place, you’ll get more information about the failure than with the standard PHP crash output.

4) xDebug also adds a number of helper functions to PHP. You could try any of these to see if it’s working. For example, the function xdebug_get_code_coverage() should exist and return an array. If it does, then xDebug is installed. If not, it isn’t.

<?php
echo (extension_loaded('xdebug') ? '' : 'non '), 'exists';