Conflict between libcurl3 and libcurl4
Ubuntu 18.04 includes libcurl4 by default which in fact is required by the packaged version of curl. Some legacy applications depend on libcurl3, which but libcurl3 conflicts with libcurl4. The steps below demonstrate how to alter the control file of such legacy packages to allow libcurl4 instead of libcurl3 and then how to repackage and install these packages.
People following these steps should test the updated legacy applications and confirm they run properly, or revert if they face any issue they cannot resolve.
tb@castor:~$ cd /tmp
tb@castor:/tmp$ mkdir dpkg
tb@castor:/tmp$ cd dpkg/
tb@castor:/tmp/dpkg$ apt download xxxsam osprules
Get:1 http://ocdc.hursley.xxx.com/ocdc bionic-safe/XXX amd64 xxxsam amd64 3.06-4-ocdc6 [195 kB]
Get:2 http://ocdc.hursley.xxx.com/ocdc bionic-safe/XXX amd64 osprules amd64 1.00.1-2.precise-ocdc2 [34,7 kB]
Fetched 230 kB in 0s (708 kB/s)
tb@castor:/tmp/dpkg$ ll
total 228
drwxr-xr-x 2 tb tb 80 aug 26 17:54 ./
drwxrwxrwt 26 root root 680 aug 26 17:54 ../
-rw-r--r-- 1 tb tb 194938 márc 20 2015 xxxsam_3.06-4-ocdc6_amd64.deb
-rw-r--r-- 1 tb tb 34718 júl 13 2012 osprules_1.00.1-2.precise-ocdc2_amd64.deb
tb@castor:/tmp/dpkg$ fakeroot
root@castor:/tmp/dpkg# dpkg-deb -R xxxsam_3.06-4-ocdc6_amd64.deb xxxsam
root@castor:/tmp/dpkg# dpkg-deb -R osprules_1.00.1-2.precise-ocdc2_amd64.deb ospfules
root@castor:/tmp/dpkg# sed -i 's/libcurl3 (>= 7.16.2-1)/libcurl3 (>= 7.16.2-1) | libcurl4/' xxxsam/DEBIAN/control
root@castor:/tmp/dpkg# sed -i 's/libcurl3 (>= 7.16.2-1)/libcurl3 (>= 7.16.2-1) | libcurl4/' ospfules/DEBIAN/control
root@castor:/tmp/dpkg# sed -i 's/\(^Version:.*$\)/\1+dep1/' ospfules/DEBIAN/control
root@castor:/tmp/dpkg# sed -i 's/\(^Version:.*$\)/\1+dep1/' xxxsam/DEBIAN/control
root@castor:/tmp/dpkg# dpkg-deb -b xxxsam xxxsam_3.06-4-ocdc6+dep1_amd64.deb
dpkg-deb: warning: conffile name '/etc/init.d/xxx-isambios' is duplicated
dpkg-deb: warning: conffile name '/etc/xdg/autostart/xxx-asset-management.desktop' is duplicated
dpkg-deb: warning: ignoring 2 warnings about the control file(s)
dpkg-deb: building package 'xxxsam' in 'xxxsam_3.06-4-ocdc6+dep1_amd64.deb'.
root@castor:/tmp/dpkg# dpkg -b ospfules osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb
dpkg-deb: building package 'osprules' in 'osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb'.
root@castor:/tmp/dpkg# ll
total 452
drwxr-xr-x 4 root root 160 aug 26 18:06 ./
drwxrwxrwt 26 root root 680 aug 26 18:06 ../
drwxr-xr-x 7 root root 140 aug 26 18:00 xxxsam/
-rw-r--r-- 1 root root 194938 márc 20 2015 xxxsam_3.06-4-ocdc6_amd64.deb
-rw-r--r-- 1 root root 195024 aug 26 18:04 xxxsam_3.06-4-ocdc6+dep1_amd64.deb
drwxr-xr-x 4 root root 80 aug 26 18:00 ospfules/
-rw-r--r-- 1 root root 34718 júl 13 2012 osprules_1.00.1-2.precise-ocdc2_amd64.deb
-rw-r--r-- 1 root root 29128 aug 26 18:06 osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb
root@castor:/tmp/dpkg# exit
exit
tb@castor:/tmp/dpkg$ sudo apt install -f ./xxxsam_3.06-4-ocdc6+dep1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'xxxsam' instead of './xxxsam_3.06-4-ocdc6+dep1_amd64.deb'
The following packages will be upgraded:
xxxsam
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/195 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /tmp/dpkg/xxxsam_3.06-4-ocdc6+dep1_amd64.deb xxxsam amd64 3.06-4-ocdc6+dep1 [195 kB]
(Reading database ... 369572 files and directories currently installed.)
Preparing to unpack .../xxxsam_3.06-4-ocdc6+dep1_amd64.deb ...
Unpacking xxxsam (3.06-4-ocdc6+dep1) over (3.06-4-ocdc6) ...
Setting up xxxsam (3.06-4-ocdc6+dep1) ...
.
Processing triggers for systemd (237-3ubuntu10.25) ...
Processing triggers for ureadahead (0.100.0-21) ...
tb@castor:/tmp/dpkg$ sudo apt install -f ./osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'osprules' instead of './osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb'
The following packages will be upgraded:
osprules
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/29,1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /tmp/dpkg/osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb osprules amd64 1.00.1-2.precise-ocdc2+dep1 [29,1 kB]
(Reading database ... 369572 files and directories currently installed.)
Preparing to unpack .../osprules_1.00.1-2.precise-ocdc2+dep1_amd64.deb ...
Unpacking osprules (1.00.1-2.precise-ocdc2+dep1) over (1.00.1-2.precise-ocdc2) ...
Setting up osprules (1.00.1-2.precise-ocdc2+dep1) ...
Creating symbolic links ...
tb@castor:/tmp/dpkg$