thctlo / Kopano

Scripts for Kopano
25 stars 11 forks source link

E: Failed to fetch file:/etc/kopano/amd64}/Packages File not found - /etc/kopano/amd64}/Packages (2: No such file or directory) #10

Closed MarcAngelo closed 3 years ago

MarcAngelo commented 3 years ago

When running the script, it generates the following error: Generating packages file : amd64/Packages Running apt update, please wait: E: Failed to fetch file:/etc/kopano/amd64}/Packages File not found - /etc/kopano/amd64}/Packages (2: No such file or directory)

I guess the '}' should be removed.

When I change the following line in function "function generate_kopano_Packages_for_repo {" from deb [trusted=yes] file:$REPO_BASE_FOLDER $GET_ARCH}/ to deb [trusted=yes] file:$REPO_BASE_FOLDER $GET_ARCH/ (removed accolade)

then, the errormessage is gone and the sources.list file is correctly generated.

But... When I then type "apt update", I notice the following: Get:1 file:/etc/kopano amd64/ InRelease Ign:1 file:/etc/kopano amd64/ InRelease Get:2 file:/etc/kopano amd64/ Release Ign:2 file:/etc/kopano amd64/ Release Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages Ign:3 file:/etc/kopano amd64/ Packages Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Get:3 file:/etc/kopano amd64/ Packages [135 kB] Get:4 file:/etc/kopano amd64/ Translation-en Ign:4 file:/etc/kopano amd64/ Translation-en Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease Hit:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease Get:7 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB] Fetched 114 kB in 0s (469 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date.

When I type "apt install kopano-server-packages", I get the following result: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: kopano-server-packages : Depends: kopano-backup but it is not going to be installed Depends: kopano-dagent but it is not going to be installed Depends: kopano-dagent-pytils but it is not going to be installed Depends: kopano-gateway but it is not going to be installed Depends: kopano-ical but it is not going to be installed Depends: kopano-monitor but it is not going to be installed Depends: kopano-python-utils but it is not going to be installed Depends: kopano-search but it is not going to be installed Depends: kopano-server but it is not going to be installed Depends: kopano-spooler but it is not going to be installed E: Unable to correct problems, you have held broken packages.

So installations fails...

Tested under Ubuntu 20.04

thctlo commented 3 years ago

i'll do a check on a new clean server, see whats off, i come back to this today.

thctlo commented 3 years ago

what i see here is, your apt repo folder is set to /etc/kopano. that not the best place to put it. Did you change anything in the script.

MarcAngelo commented 3 years ago

I only changed the following: BASE_FOLDER="/etc/kopano" and KOPANO_COMMUNITY_PKG="core archiver files mdm smime webapp migration-pst deskapp kapps mattermost meet webmeetings"

I think that the '}' in line 278 is a typo, but am not sure. Line 278: deb [trusted=yes] file:$REPO_BASE_FOLDER $GET_ARCH}/

When I removed the '}' all seems fine, until I try to install using "apt install kopano-server-packages".

I used /etc/kopano, because on my old kopano server (8.4.0.22), the configs are located in that folder, and I don't use a '/srv/' folder on any Linux server.

With the removal of the '}', creation of /etc/apt/sources.lists.d/kopano-community.list seems allright Altough I'm unable to install kopano using "apt install kopano-server-packages", as it gives the following result:

apt install kopano-server-packages

Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: kopano-server-packages : Depends: kopano-backup but it is not going to be installed Depends: kopano-dagent but it is not going to be installed Depends: kopano-dagent-pytils but it is not going to be installed Depends: kopano-gateway but it is not going to be installed Depends: kopano-ical but it is not going to be installed Depends: kopano-monitor but it is not going to be installed Depends: kopano-python-utils but it is not going to be installed Depends: kopano-search but it is not going to be installed Depends: kopano-server but it is not going to be installed Depends: kopano-spooler but it is not going to be installed E: Unable to correct problems, you have held broken packages.

When I type "apt-cache policy kopano-server-packages kopano-webapp z-push-kopano", the path seems not correct to me:

apt-cache policy kopano-server-packages kopano-webapp z-push-kopano

kopano-server-packages: Installed: (none) Candidate: 11.0.2.43.ff0916691-0+702.1 Version table: 11.0.2.43.ff0916691-0+702.1 500 500 file:/etc/kopano amd64/ Packages kopano-webapp: Installed: (none) Candidate: 6.0.0.55-1+2025.1 Version table: 6.0.0.55-1+2025.1 500 500 file:/etc/kopano amd64/ Packages z-push-kopano: Installed: (none) Candidate: (none) Version table:

I just tested this morning both on Ubuntu 18.04 and also on 20.04. The behaviour is the same on both versions of Ubuntu.

thctlo commented 3 years ago

Hai, thanks for the info. save me some time. 👍 It's all fixed now, i've tested it on a vanilla Debian 10 and Ubuntu 20.04.

MarcAngelo commented 3 years ago

Just tested the corrected script on a new ubuntu 20.04 system, but unfortunatly installation still fails.

Also tried the default installation as stated in the readme, without any modifications: wget -O - https://raw.githubusercontent.com/thctlo/Kopano/master/get-kopano-community.sh | bash apt install kopano-server-packages

Result:

wget -O - https://raw.githubusercontent.com/thctlo/Kopano/master/get-kopano-community.sh | bash

--2021-08-23 11:55:45-- https://raw.githubusercontent.com/thctlo/Kopano/master/get-kopano-community.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 13107 (13K) [text/plain] Saving to: 'STDOUT'

2021-08-23 11:55:45 (5.01 MB/s) - written to stdout [13107/13107]

Script is running on : Ubuntu focal curl found jq found apt-ftparchive found Detected variable REPO_BASE_FOLDER/GET_ARCH : /srv/repo/kopano/amd64/ NOT Detected : /srv/repo/kopano/amd64/ creating folder now. Please wait, getting kopano components : core : Done Please wait, getting kopano components : archiver : Done Please wait, getting kopano components : files : Done Please wait, getting kopano components : mdm : Done Please wait, getting kopano components : smime : Done Please wait, getting kopano components : webapp : Done Please wait, getting kopano components : migration-pst : Done

The installed Kopano apt-list file: /etc/apt/sources.list.d/kopano-community.list

Generating packages file : amd64/Packages Running apt update, please wait: Done kopano-server: Installed: (none) Candidate: 11.0.2.43.ff0916691-0+702.1 Version table: 11.0.2.43.ff0916691-0+702.1 500 500 file:/srv/repo/kopano amd64/ Packages 8.7.0-7ubuntu1 500 500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages

The AD DC extension can be found here: https://download.kopano.io/community/adextension:/ The Outlook extension : https://download.kopano.io/community/olextension:/ Install the complete kopano stack at once with : apt install kopano-server-packages The script got the following packages ready for install for you: core archiver files mdm smime webapp migration-pst z-push

When you are upgrading: apt dist-upgrade && kopano-dbadm usmp root@srv-kopano:/DATA# apt install kopano-server-packages Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: kopano-server-packages : Depends: kopano-backup but it is not going to be installed Depends: kopano-dagent but it is not going to be installed Depends: kopano-dagent-pytils but it is not going to be installed Depends: kopano-gateway but it is not going to be installed Depends: kopano-ical but it is not going to be installed Depends: kopano-monitor but it is not going to be installed Depends: kopano-python-utils but it is not going to be installed Depends: kopano-search but it is not going to be installed Depends: kopano-server but it is not going to be installed Depends: kopano-spooler but it is not going to be installed E: Unable to correct problems, you have held broken packages. root@srv-kopano:/DATA#

thctlo commented 3 years ago

Hai, you missed the small note.. ;-)

rm /etc/apt/sources.list.d/kopano-community.list And rerun the script.

thctlo commented 3 years ago

ah wait.. now i see more here..

thctlo commented 3 years ago

i see we miss this part. https://download.kopano.io/community/dependencies%3A/

Im on it.

MarcAngelo commented 3 years ago

I can confirm that it works on Debian 10 (just tested), but I would prefer Ubuntu 20.04.

thctlo commented 3 years ago

There is more going on here on ubuntu 20.04.. Yes, i can confirm Debian 10 works, i just installed these, ubuntu 20.04 has again dependecie problems. They should stop with the package numbers, totaly out of scope of ubuntu/debian

So Ubuntu 20.04: results in. The following packages have unmet dependencies: kopano-backup : Depends: python3-kopano (= 11.0.2.43.ff0916691-0+651.1) but it is not going to be installed kopano-dagent : Depends: libicu63 (>= 63.1-1~) but it is not installable Depends: libkcarchiver0 but it is not going to be installed Depends: libkcinetmapi0 but it is not going to be installed Depends: libkcutil0 but it is not going to be installed Depends: libmapi1 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed Depends: libkcpyplug0 (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed kopano-dagent-pytils : Depends: python3-kopano (= 11.0.2.43.ff0916691-0+651.1) but it is not going to be installed Depends: python3-kopano-utils (= 11.0.2.43.ff0916691-0+651.1) but it is not going to be installed kopano-gateway : Depends: libicu63 (>= 63.1-1~) but it is not installable Depends: libkcinetmapi0 but it is not going to be installed Depends: libkcutil0 but it is not going to be installed Depends: libmapi1 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed kopano-ical : Depends: libical3 but it is not going to be installed Depends: libicu63 (>= 63.1-1~) but it is not installable Depends: libkcfreebusy0 but it is not going to be installed Depends: libkcicalmapi0 but it is not going to be installed Depends: libkcutil0 but it is not going to be installed Depends: libmapi1 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed kopano-monitor : Depends: libkcutil0 but it is not going to be installed Depends: libmapi1 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed kopano-python-utils : Depends: kopano-client-uv (= 11.0.2.43.ff0916691) Depends: python3-kopano (= 11.0.2.43.ff0916691-0+651.1) but it is not going to be installed kopano-search : Depends: python3-kopano-search (= 11.0.2.43.ff0916691-0+651.1) but it is not going to be installed kopano-server : Depends: libicu63 (>= 63.1-1~) but it is not installable Depends: libkcserver0 but it is not going to be installed Depends: libkcsoap0 but it is not going to be installed Depends: libkcutil0 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed kopano-spooler : Depends: libkcarchiver0 but it is not going to be installed Depends: libkcinetmapi0 but it is not going to be installed Depends: libkcutil0 but it is not going to be installed Depends: libmapi1 but it is not going to be installed Depends: kopano-client (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed Depends: libkcpyplug0 (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed Depends: python3-mapi (= 11.0.2.43.ff0916691-0+702.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

thctlo commented 3 years ago

the script now works as it should again. just keep eye on this threath.

https://forum.kopano.io/topic/3843/ubuntu-20-04-depend-problems

thctlo commented 3 years ago

1 example of a wrong packaging..

kopano-dagent : Depends: libicu63 (>= 63.1-1~) but it is not installable Ubuntu 20.04 only has libicu66

so my advice, stay away from ubuntu 20.04.. for now..

thctlo commented 3 years ago

Ok Guys, its fixed, i missed the loop for the OS detection, and that always defaulted to Debian_10. All verified now on Debian10 and Ubuntu20.04

Thanks all for the reports, most welkom and very appriciated. Closed.