broken smtpd auth after update Cyrus SASL - postfix-mta

after migrating from depreciated smtpd_recipient_restrictions to smtpd_relay_restrictions, outbound smtp hangs for users and these are the errors I find in the logs. "auxpropfunc error version mismatch with plug-in" and a "_sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql"
emailer1 saslfinger-1.0.3 # ./saslfinger -s
saslfinger - postfix Cyrus sasl configuration Fri Aug 30 00:48:43 UTC 2013
version: 1.0.2
mode: server-side SMTP AUTH
-- basics --
Postfix: 2.10.1
System: Gentoo Base System release 2.2
-- smtpd is linked to --
libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f262e22a000)
libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007f262d6cc000)
-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/ssl/postfix/nyctelecomm.com.crt
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/postfix/nyctelecomm.com.crt
smtpd_tls_key_file = /etc/ssl/postfix/nyctelecomm.com.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
-- listing of /usr/lib64/sasl2 --
total 1180
drwxr-xr-x 2 root root 4096 Aug 11 20:29 .
drwxr-xr-x 43 root root 12288 Aug 28 18:22 ..
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so.3
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so.3.0.0
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so.3
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so.3.0.0
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so.3
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so.3.0.0
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so.3
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so.3.0.0
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so.3
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so.3.0.0
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so.3
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so.3.0.0
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so.3
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so.3.0.0
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so.3
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so.3.0.0
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so.3
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so.3.0.0
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so.3
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so.3.0.0
-- listing of /usr/lib/sasl2 --
total 1180
drwxr-xr-x 2 root root 4096 Aug 11 20:29 .
drwxr-xr-x 43 root root 12288 Aug 28 18:22 ..
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so.3
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 libanonymous.so.3.0.0
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so.3
-rwxr-xr-x 1 root root 22760 Aug 11 20:29 libcrammd5.so.3.0.0
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so.3
-rwxr-xr-x 1 root root 56040 Aug 11 20:29 libdigestmd5.so.3.0.0
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so.3
-rwxr-xr-x 1 root root 18632 Aug 11 20:29 liblogin.so.3.0.0
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so.3
-rwxr-xr-x 1 root root 35208 Aug 11 20:29 libntlm.so.3.0.0
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so.3
-rwxr-xr-x 1 root root 109056 Aug 11 20:29 libotp.so.3.0.0
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so.3
-rwxr-xr-x 1 root root 18664 Aug 11 20:29 libplain.so.3.0.0
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so.3
-rwxr-xr-x 1 root root 26800 Aug 11 20:29 libsasldb.so.3.0.0
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so.3
-rwxr-xr-x 1 root root 39208 Aug 11 20:29 libscram.so.3.0.0
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so.3
-rwxr-xr-x 1 root root 26816 Aug 11 20:29 libsql.so.3.0.0
-- listing of /etc/sasl2 --
total 32
drwxr-xr-x 2 root root 4096 Aug 11 20:29 .
drwxr-xr-x 58 root root 4096 Aug 29 05:12 ..
-rw-r--r-- 1 root root 147 Aug 9 02:08 ._cfg0000_smtpd.conf
-rw-r--r-- 1 root root 0 Aug 11 20:29 .keep_dev-libs_cyrus-sasl-2
-rw-r----- 1 root mail 12432 Aug 8 19:44 sasldb2
-rw-r--r-- 1 root root 405 Aug 10 07:39 smtpd.conf
-- content of /etc/sasl2/smtpd.conf --
pwcheck_method: authdaemond
mech_list: LOGIN PLAIN
authdaemon_path: /var/lib/courier/authdaemon/socket
log_level: 5
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: pgsql
password_format: crypt
mech_list: LOGIN PLAIN
sql_engine: pgsql
#sql_hostnames: localhost
sql_database: postfix
sql_user: --- replaced ---
sql_passwd: --- replaced ---
sql_select: SELECT password FROM mailbox WHERE local_part='%u' AND active='1'
-- active services in /etc/postfix/master.cf --
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
user1 unix - - n - - smtp
-o syslog_name=postfix-user1
-o smtp_bind_address6=2600:3c01:e000:44:0:0:0:10
-- mechanisms on localhost --
250-AUTH LOGIN PLAIN
-- end of saslfinger output --
******************************* postmap ************************************
emailer1 htdocs # postmap -q "info#nyctelecomm.com" pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
info#nyctelecomm.com
emailer1 htdocs # postmap -q "nyctelecomm.com" pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf
nyctelecomm
emailer1 htdocs # postmap -q "info#nyctelecomm.com" pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
nyctelecomm.com/info/
********************************************* postconf ************************
emailer1 htdocs # postconf -n
broken_sasl_auth_clients = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 3
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
home_mailbox = .maildir/
html_directory = no
inet_protocols = ipv4, ipv6
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sender_dependent_default_transport_maps = hash:/etc/postfix/transport.cf
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated permit_mynetworks, check_client_access
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated permit_mynetworks, reject_unknown_helo_hostname, reject_invalid_helo_hostname
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks, permit_sasl_authenticated
smtpd_relay_restrictions = permit_sasl_authenticated permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_tls_CAfile = /etc/ssl/postfix/nyctelecomm.com.crt
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/postfix/nyctelecomm.com.crt
smtpd_tls_key_file = /etc/ssl/postfix/nyctelecomm.com.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
virtual_uid_maps = static:5000
************************ error ***********************************
2013-08-28T23:06:57+00:00 emailer1 postfix/smtpd[21746]: auxpropfunc error version mismatch with plug-in
2013-08-28T23:06:57+00:00 emailer1 postfix/smtpd[21746]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sasldb
2013-08-28T23:06:57+00:00 emailer1 postfix/smtpd[21746]: auxpropfunc error version mismatch with plug-in
2013-08-28T23:06:57+00:00 emailer1 postfix/smtpd[21746]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin:

There was a stuck version in the libraries.
I emerge -C cyrus-sasl, then downgraded to an earlier version, I saw the collision overwrites occur, went back to the regular cyrus and the error went away.

Related

Cron job indicates error - mv: cannot access <filename> but the files have moved

The logs for my cron job show the following:
Your "cron" job on
produced the following output:
mv: cannot access *SRP*
mv: cannot access 0001LO928365.CSE
...
and so on.
But the files did actually move to the desired location.
What might be causing this error? Any help is appreciated!
Apologies - I figured this one out.
The move command is looking for different file types and moving all types. Even if the file is present, the command outputs an error stating file not found.
See testing details below:
root#abcd-abcdef:~/movetest/out# ls -lrt
total 5
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile1.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile2.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile3.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile4.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile5.CSE
root#abcd-abcdef:~/movetest/out# cd ../archive
root#abcd-abcdef:~/movetest/archive# ls -lrt
total 0
root#abcd-abcdef:~/movetest/archive# cd -
/home/specuser/movetest/out
root#abcd-abcdef:~/movetest/out# mv *.SRP* *.CSE* *SRP* *CSE* *.xml* ../archive/
mv: cannot access *.SRP*
mv: cannot access *SRP*
mv: cannot access testfile1.CSE
mv: cannot access testfile2.CSE
mv: cannot access testfile3.CSE
mv: cannot access testfile4.CSE
mv: cannot access testfile5.CSE
mv: cannot access *.xml*
root#abcd-abcdef:~/movetest/out# ls -lrt
total 0
root#abcd-abcdef:~/movetest/out# cd -
/home/specuser/movetest/archive
root#abcd-abcdef:~/movetest/archive# ls -lrt
total 5
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile1.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile2.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile3.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile4.CSE
-rw-r--r-- 1 root root 0 Aug 20 13:53 testfile5.CSE
root#abcd-abcdef:~/movetest/archive#*

What is the purpose of --file-type in ls command

I'm trying to understand the purpose of the --file-type argument of the UNIX ls command.
I didn't find any example using ls --file-type on the web – neither was I able to make sense of the --file-type argument by issuing ls --file-type myself.
What's the purpose of ls --file-type? Would anyone please give me a helpful example of ls --file-type making the purpose of this argument more clear to me?
Quoting from info ls:
-F
Append a character to each file name indicating the file type.
Also, for regular files that are executable, append *. The file
type indicators are / for directories, # for symbolic links,
| for FIFOs, = for sockets, > for doors, and nothing for
regular files.
--file-type is just like -F, except that it doesn't append * for executable files:
$ ln -s /etc/passwd foo
$ touch bar; chmod +x bar
$ ls
foo bar
$ ls -F
foo# bar*
$ ls --file-type
foo# bar
...
...
The --file-type option is similar to the -F option.
-F, --classify
append indicator (one of */=>#|) to entries
--file-type
likewise, except do not append `*'
Source.
Here's an example of ls --file-tye /
bin# boot/ dev/ etc/ home/ lib# lib64# lost+found/ media/ mnt/ opt/ proc/ root/ run/ sbin# srv/ sys/ tmp/ usr/ var/
as compared to the output of ls -l /
lrwxrwxrwx 1 root root 7 Jan 19 02:32 bin -> usr/bin
drwxr-xr-x 4 root root 4096 Jan 1 1970 boot
drwxr-xr-x 24 root root 4220 Mar 26 19:56 dev
drwxr-xr-x 88 root root 4096 Mar 26 21:15 etc
drwxr-xr-x 4 root root 4096 Apr 5 2020 home
lrwxrwxrwx 1 root root 7 Jan 19 02:32 lib -> usr/lib
lrwxrwxrwx 1 root root 7 Jan 19 02:32 lib64 -> usr/lib
drwx------ 2 root root 16384 Apr 5 2020 lost+found
drwxr-xr-x 2 root root 4096 Dec 11 20:19 media
drwxr-xr-x 7 root root 4096 Sep 8 2020 mnt
drwxr-xr-x 9 root root 4096 Feb 9 13:58 opt
dr-xr-xr-x 335 root root 0 Mar 26 19:56 proc
drwxr-x--- 9 root root 4096 Feb 11 13:18 root
drwxr-xr-x 28 root root 700 Mar 26 21:15 run
lrwxrwxrwx 1 root root 7 Jan 19 02:32 sbin -> usr/bin
drwxr-xr-x 4 root root 4096 Apr 5 2020 srv
dr-xr-xr-x 13 root root 0 Mar 26 19:56 sys
drwxrwxrwt 12 root root 320 Mar 26 22:11 tmp
drwxr-xr-x 9 root root 4096 Mar 25 11:06 usr
drwxr-xr-x 12 root root 4096 Mar 25 11:07 var
As you see the symbol "#" indicates symbolic-links (l). Directories (d) and regular files (f) are not flagged by the --file-type argument.
Issuing ls --file-type in my home directory is identical to ls ~ since it only contains directories and regular files and hence the output of the former doesn't contain any indicators.
See also the answer of PesaThe for a full list of the indicator symbols.

How to build SNAP package from Qt project

It's my first time then I build a program into the SNAP package. I want to make my program more accessible.
The build is going without problems.
But libqtnetwor5 not see a couple needed libraries. Right here below you can see description of all logs and configurations.
The project tree:
tree
.
├── bin
│ └── ProjectTimer
├── setup
│ └── gui
│ └── icon.png
├── snapcraft.yaml
└── timerproject_1.0_amd64.snap
3 directories, 4 files
snapcraft.yaml
name: timerproject
version: "1.0"
summary: timer
description: |
Application for time-management
confinement: strict
architectures: [amd64]
apps:
timerproject:
command: desktop-launch ProjectTimer
plugs: ['home', 'unity7', 'x11', 'network']
parts:
timerproject:
plugin: copy
files:
bin/ProjectTimer : usr/bin/ProjectTimer
setup/gui/icon.png : usr/share/icons/timer.ico
integration:
plugin: nil
stage-packages:
- libc-bin
- libqt5network5
after: [desktop/qt5]
ldd ProjectTimer shows all libreries that the program need:
ldd bin/ProjectTimer
linux-vdso.so.1 => (0x00007fff1f1fc000)
libQt5QuickControls2.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5QuickControls2.so.5 (0x00007f5d2ad62000)
libQt5Quick.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Quick.so.5 (0x00007f5d2a772000)
libQt5Widgets.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Widgets.so.5 (0x00007f5d29f22000)
libQt5Gui.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Gui.so.5 (0x00007f5d2977a000)
libQt5Qml.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Qml.so.5 (0x00007f5d2917a000)
libQt5Core.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Core.so.5 (0x00007f5d28a5a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5d286b2000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5d2849a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5d280ca000)
libQt5Network.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Network.so.5 (0x00007f5d27d6a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5d27b4a000)
libQt5QuickTemplates2.so.5 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5QuickTemplates2.so.5 (0x00007f5d27882000)
libGL.so.1 => /usr/lib/nvidia-361/libGL.so.1 (0x00007f5d275f2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5d272e2000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5d270c2000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5d26eba000)
/lib64/ld-linux-x86-64.so.2 (0x0000562df3108000)
libicui18n.so.56 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libicui18n.so.56 (0x00007f5d26a1a000)
libicuuc.so.56 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libicuuc.so.56 (0x00007f5d26662000)
libicudata.so.56 => /media/free/Qt5.7.0/5.7/gcc_64/lib/libicudata.so.56 (0x00007f5d24c7a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5d24a72000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f5d2486a000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f5d24552000)
libGLX.so.0 => /usr/lib/nvidia-361/libGLX.so.0 (0x00007f5d2431a000)
libGLdispatch.so.0 => /usr/lib/nvidia-361/libGLdispatch.so.0 (0x00007f5d24032000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f5d23dc2000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5d23a82000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f5d2386a000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f5d23642000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f5d2343a000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f5d23232000)
If I start to program, I see message:
timerproject
ProjectTimer: /snap/timerproject/x1/usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version Qt_5' not found
(required by /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Quick.so.5)
ProjectTimer: /snap/timerproject/x1/usr/lib/x86_64-linux-gnu/libQt5Network.so.5: versionQt_5' not found
(required by /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Qml.so.5)
This is libraries for SNAP package:
ls -l /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib
-rwxr-xr-x 1 root root 25047100 янв 28 2016 libicudata.so.56
-rwxr-xr-x 1 root root 3374854 янв 28 2016 libicui18n.so.56
-rwxr-xr-x 1 root root 2070162 янв 28 2016 libicuuc.so.56
-rwxr-xr-x 1 root root 5339752 июл 30 16:45 libQt5Core.so.5
-rwxr-xr-x 1 root root 5909528 июн 10 12:10 libQt5Gui.so.5
-rwxr-xr-x 1 root root 4156520 июн 11 17:18 libQt5Qml.so.5
-rwxr-xr-x 1 root root 78696 июн 13 00:46 libQt5QuickControls2.so.5
-rwxr-xr-x 1 root root 4125768 июн 11 17:18 libQt5Quick.so.5
-rwxr-xr-x 1 root root 807600 июн 13 00:46 libQt5QuickTemplates2.so.5
-rwxr-xr-x 1 root root 6614408 июн 10 12:10 libQt5Widgets.so.5
My system have in standard libraries Qt:
ls -l /usr/lib/x86_64-linux-gnu/libQt5*
-rw-r--r-- 1 root root 1014 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Core.prl
lrwxrwxrwx 1 root root 19 май 2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Core.so -> libQt5Core.so.5.5.1
lrwxrwxrwx 1 root root 19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 -> libQt5Core.so.5.5.1
lrwxrwxrwx 1 root root 19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5 -> libQt5Core.so.5.5.1
-rw-r--r-- 1 root root 5052920 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
-rw-r--r-- 1 root root 1008 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5DBus.prl
lrwxrwxrwx 1 root root 19 май 2 15:39 /usr/lib/x86_64-linux-gnu/libQt5DBus.so -> libQt5DBus.so.5.5.1
lrwxrwxrwx 1 root root 19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 -> libQt5DBus.so.5.5.1
lrwxrwxrwx 1 root root 19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.5 -> libQt5DBus.so.5.5.1
-rw-r--r-- 1 root root 509456 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.5.1
lrwxrwxrwx 1 root root 23 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5 -> libQt5Feedback.so.5.0.0
lrwxrwxrwx 1 root root 23 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5.0 -> libQt5Feedback.so.5.0.0
-rw-r--r-- 1 root root 52144 мар 14 14:20 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5.0.0
-rw-r--r-- 1 root root 1039 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Gui.prl
lrwxrwxrwx 1 root root 18 май 2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Gui.so -> libQt5Gui.so.5.5.1
lrwxrwxrwx 1 root root 18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 -> libQt5Gui.so.5.5.1
lrwxrwxrwx 1 root root 18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5 -> libQt5Gui.so.5.5.1
-rw-r--r-- 1 root root 5514016 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5.1
-rw-r--r-- 1 root root 1002 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Network.prl
lrwxrwxrwx 1 root root 22 май 2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Network.so -> libQt5Network.so.5.5.1
lrwxrwxrwx 1 root root 22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 -> libQt5Network.so.5.5.1
lrwxrwxrwx 1 root root 22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.5 -> libQt5Network.so.5.5.1
-rw-r--r-- 1 root root 1412480 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.5.1
-rw-r--r-- 1 root root 1266500 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5OpenGLExtensions.a
-rw-r--r-- 1 root root 1056 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5OpenGLExtensions.prl
lrwxrwxrwx 1 root root 21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.5.1
lrwxrwxrwx 1 root root 21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.5 -> libQt5OpenGL.so.5.5.1
-rw-r--r-- 1 root root 362752 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.5.1
lrwxrwxrwx 1 root root 18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 -> libQt5Qml.so.5.5.1
lrwxrwxrwx 1 root root 18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.5 -> libQt5Qml.so.5.5.1
-rw-r--r-- 1 root root 4358744 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.5.1
lrwxrwxrwx 1 root root 20 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5 -> libQt5Quick.so.5.5.1
lrwxrwxrwx 1 root root 20 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.5 -> libQt5Quick.so.5.5.1
-rw-r--r-- 1 root root 3991248 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.5.1
lrwxrwxrwx 1 root root 24 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.5.1
lrwxrwxrwx 1 root root 24 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.5 -> libQt5QuickTest.so.5.5.1
-rw-r--r-- 1 root root 119232 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.5.1
lrwxrwxrwx 1 root root 21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5 -> libQt5WebKit.so.5.5.1
lrwxrwxrwx 1 root root 21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5.5 -> libQt5WebKit.so.5.5.1
-rw-r--r-- 1 root root 37857816 ноя 30 2015 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5.5.1
lrwxrwxrwx 1 root root 28 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 -> libQt5WebKitWidgets.so.5.5.1
lrwxrwxrwx 1 root root 28 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.5 -> libQt5WebKitWidgets.so.5.5.1
-rw-r--r-- 1 root root 282016 ноя 30 2015 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.5.1
-rw-r--r-- 1 root root 1059 май 2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Widgets.prl
lrwxrwxrwx 1 root root 22 май 2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so -> libQt5Widgets.so.5.5.1
lrwxrwxrwx 1 root root 22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 -> libQt5Widgets.so.5.5.1
lrwxrwxrwx 1 root root 22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5 -> libQt5Widgets.so.5.5.1
-rw-r--r-- 1 root root 6861328 май 2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
Maybe someone can understand where is the error? Or maybe someone can tell me how better to deal with libraries (my project not used a system libraries)
And last question, but not least does someone know how to build Qt projects like this?
The problem is that you're mixing Qt libraries from your own build and from your distribution (presumably, Ubuntu). The binary you're building depends on one Qt library (which you get from your own Qt build) and that one in turn depends on another Qt library that you get from Ubuntu. So the solution to this problem is to use only one source for Qt libraries.
I'd probably go for distribution libraries, unless there are some very specific reasons for using your own. To do it this way you need to fix your binary compilation (there are not enough details about it at the moment) to not link with your libraries (-I and -L flags, -rpath and similar things), everything else should be done automatically.
To package your own libraries you need to build them with -rpath flag so that dependencies for one library would also be resolved in your libraries directory. From what I see, snapcraft should be able to pick them in this case.

'pdfseparate': Format output file name as page number with leading zeroes

pdfseparate requires to specify %d as PDF-page-pattern which is replaced by the page number.
$ pdfseparate CFL_1115_ISSUU.pdf cfl-%d.pdf works. It sets separated output file names as cfl-1.pdf, cfl-2.pdf, ..., cfl-10.pdf etc.
Now I need to add leading 0 to fix the file name string length. So when I try to use formatting characters in command $ pdfseparate CFL_1115_ISSUU.pdf cfl-%04d.pdf, it gives error Syntax Error: 'cfl-%04d.pdf' must contain '%d' if more than one page should be extracted
Can anybody suggest if such formatting is possible?
On my system (Mac OS X), using the most recent version of Poppler, v0.42.0, this command works as expected:
$ pdfseparate -l 10 PDF32000_2008.pdf cfl-%04d.pdf
$ ls -l cfl-*.pdf
-rw-r--r-- 1 kp staff 11475 23 Mär 18:58 cfl-0001.pdf
-rw-r--r-- 1 kp staff 91252 23 Mär 18:58 cfl-0002.pdf
-rw-r--r-- 1 kp staff 8334441 23 Mär 18:58 cfl-0003.pdf
-rw-r--r-- 1 kp staff 8334443 23 Mär 18:58 cfl-0004.pdf
-rw-r--r-- 1 kp staff 8334444 23 Mär 18:58 cfl-0005.pdf
-rw-r--r-- 1 kp staff 93209 23 Mär 18:58 cfl-0006.pdf
-rw-r--r-- 1 kp staff 89540 23 Mär 18:58 cfl-0007.pdf
-rw-r--r-- 1 kp staff 64383 23 Mär 18:58 cfl-0008.pdf
-rw-r--r-- 1 kp staff 8334444 23 Mär 18:58 cfl-0009.pdf
-rw-r--r-- 1 kp staff 116229 23 Mär 18:58 cfl-0010.pdf

QTDir why not display all the folder in the root "/" in MacOs?

I'm starting to use QT, and trying QDir I copy the example in the references of QT the one which listing the content of a folder.
I'm trying to listing the content of the root path in a MacOS snow leopard, version of QT 5.1.1 But don't appear all of it :S
This is the code:
QFileInfoList list = QDir::root().entryInfoList();
for(int i=0; i<list.count(); i++){
cout<< list[i].fileName().toStdString()<<endl;
}
But the output of this program is:
.
..
Applications
Developer
Library
opt
sockets.log
System
Users
When I think it should be:
I know that ls -l don't show . and .. my worry is about the other folders, I put a line break separating the folders that appears in the output and ones who don't.
$ ls -l /
drwxrwxr-x+ 63 root admin 2142 Sep 18 21:22 Applications
drwxrwxr-x# 15 root admin 510 Jan 1 2012 Developer
drwxrwxr-t+ 63 root admin 2142 Sep 16 13:05 Library
drwxr-xr-x 3 root admin 102 Jul 23 02:45 opt
-rw-rw-rw- 1 Andreu admin 75 Sep 19 12:35 sockets.log
drwxr-xr-x 4 root wheel 136 Sep 15 20:49 System
drwxr-xr-x 5 root admin 170 Sep 15 20:17 Users
drwxr-xr-x# 2 root wheel 68 Jun 23 2009 Network
drwxrwxrwt# 5 root admin 170 Sep 16 14:01 Volumes
drwxr-xr-x# 39 root wheel 1326 Sep 15 22:46 bin
drwxrwxr-t# 2 root admin 68 Jun 23 2009 cores
dr-xr-xr-x 3 root wheel 4272 Sep 16 13:26 dev
lrwxr-xr-x# 1 root wheel 11 Sep 15 20:04 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 Sep 16 13:26 home
-rw-r--r--# 1 root wheel 20828964 Jun 8 2011 mach_kernel
dr-xr-xr-x 2 root wheel 1 Sep 16 13:26 net
drwxr-xr-x# 6 root wheel 204 Sep 15 20:08 private
drwxr-xr-x# 67 root wheel 2278 Sep 15 22:46 sbin
lrwxr-xr-x# 1 root wheel 11 Sep 15 20:04 tmp -> private/tmp
drwxr-xr-x# 14 root wheel 476 Sep 16 13:07 usr
lrwxr-xr-x# 1 root wheel 11 Sep 15 20:04 var -> private/var
Anyone can tell me why the other folders not appear?
Thanks :)
Add filter to entryInfoList
On Unix entryInfoList() does not list hidden files. You have to "ask" for them. I think it will be similiar on Mac.
QFileInfoList list = QDir::root().entryInfoList(QDir::AllEntries | QDir::System | QDir::Hidden);
for(int i=0; i<list.count(); i++){
cout<< list[i].fileName().toStdString()<<endl;
}

Resources