d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
619 stars 43 forks source link

Build Install fails: nchat-git: /usr/local/share/man exists in filesystem (owned by filesystem) #35

Closed CustomIcon closed 3 years ago

CustomIcon commented 3 years ago

The same issue i had when I used another app called weechat. but they fixed in a later update. however I dont know the exact commit but here is the thread: https://bbs.archlinux.org/viewtopic.php?id=201322 seems like same thing is happening here in nchat. i can use it in build directory however, unable to install it.


==> Making package: nchat-git 0.27.r26.g1966214-1 (06:59:04 2021 ޖޫން 03 ބުރާސްފަތި)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating nchat git repo...
Fetching origin
==> Validating source files with md5sums...
    nchat ... Skipped
==> Extracting sources...
  -> Creating working copy of nchat git repo...
Reset branch 'makepkg'
==> Starting prepare()...
==> Starting pkgver()...
==> WARNING: A package has already been built, installing existing package...
==> Installing package nchat-git with pacman -U...
[sudo] password for poki:         
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) nchat-git-0.27.r26.g1966214-1

Total Installed Size:  16.89 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                               [------------------------------------------------------] 100%
(1/1) checking package integrity                                                             [------------------------------------------------------] 100%
(1/1) loading package files                                                                  [------------------------------------------------------] 100%
(1/1) checking for file conflicts                                                            [------------------------------------------------------] 100%
error: failed to commit transaction (conflicting files)
nchat-git: /usr/local/share/man exists in filesystem (owned by filesystem)
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).```
d99kris commented 3 years ago

Hi @pokurt - I assume this issue is under Arch Linux?

May I also know which command was used to build / install nchat?

CustomIcon commented 3 years ago

Here are the commands i used:

git clone https://aur.archlinux.org/nchat-git.git && cd nchat-git
makepkg -s   # this will build tdlib and also build nchat client with tdlib
makepkg -i   # where it fails

manually installing by going into build directory of nchat and type in sudo make install works for now.

jonnieey commented 3 years ago

nchat creates it's man pages in /usr/local/share/man. However sometimes this is a link to /usr/local/man and that's why it fails. For a quick fix

delete the link, sudo rm /usr/local/share/man Install the program using makepkg -i Move the created file '/usr/local/share/man/man1/nchat.1.gz' to '/usr/local/man/man1.' Recreate the link cd /usr/local/share && sudo ln -s ../man man

d99kris commented 3 years ago

Hi - a fix for this has been implemented in above commit. It changes the default man-page install path for nchat, and also makes nchat respect CMAKE_INSTALL_MANDIR if set.

The AUR repository https://aur.archlinux.org/nchat-git.git is not updated yet. But once it's updated to point to latest nchat, I think the install error reported in this issue should go away. Please let me know if it doesn't. Thanks!

jonnieey commented 3 years ago

I've tested it and it works fine. The AUR repo has been updated to use the make.sh to build. I know the pkg version in the AUR repo 2.04 but that is automatically generated when you build using makepkg. It uses the master branch of the nchat repository. I will update the README and make a pull request.