Score:5

How can I download a Cygwin package (and its dependencies) under Ubuntu?

ng flag

I developed a backup tool for Windows which uses rsync from Cygwin. I am myself using Ubuntu.

I want to download the Windows rsync package and all other packages it depends on under Ubuntu. Is this possible?

I know the packages are all available via HTTP. But rsync has like 30 dependencies and they can change in each version.

So it's very complicated to download them all by hand.

I want to download the Windows rsync package under Ubuntu.

I am using Ubuntu 21.10.

sudodus avatar
jp flag
`rsync` is already there in Ubuntu, unless *you* have removed it. I think it is part of all current versions of Ubuntu Desktop and Ubuntu Server (installed automatically, the Ubuntu is installed).
user535733 avatar
cn flag
I'm not quite understanding why you want to download all the (deb? cygwin?) packages? For what purpose? A bit more context might help us to better advise you.
sudodus avatar
jp flag
@somega, Which version of Ubuntu are you running?
somega avatar
ng flag
I edited my question. I wasn't really clear. I want to download the **Windows rsync package** (and all its dependencies) under **Ubuntu**. I am using Ubuntu 21.10.
muru avatar
us flag
Why do you want to download the Windows rsync package in Ubuntu? You want to use it for offline installation in Windows or something?
Score:5
us flag

Edit: This answer was written before OP edited the question to download "Windows rsync package in Ubuntu" (which is confusing). This answer is about how to get rsync in Ubuntu, in case it is removed from the default installation.

The package rsync is available in the Ubuntu repositories. Open a terminal, and enter the command

sudo apt install rsync

APT will automatically take care of all the dependencies, and install rsync.

Score:4
ve flag

The answers you got are all focusing on getting rsync on Ubuntu, which is of course is trivial. If I understand you right you need the rsync windows executable with all dependencies, to package with your backup tool? So the question could be reworded as: how can I define & download the dependencies of Cygwin rsync. The answer to that question could be to use wine to run Cygwins own package manager, and let that pm figure out the hard stuff. But I've never tried that, so caveat emptor.

somega avatar
ng flag
Yes this is correct. Wine would be one solution. But a command line tool would be much better. Is this possible?
Score:4
my flag

I think you may be a bit confused because you've started on Windows. Cygwin, if I remember correctly, is a collection of Linux tools ported to Windows - it doesn't exists in Linux, simply because there is no need for it. All the tools you find in Cygwin are native to Linux, so you will find rsync in the Ubuntu repository, if it isn't already installed - to see if it is installed, you can run type rsync from a commandline (type in Linux is completely different from type in Windows - it locates a command or prints a message if it can't find it).

If it isn't there, you can install it with apt, or if you want a GUI interface, use synaptic (which you can install with apt-get install synaptic).

Ruslan avatar
bv flag
_"because there is no need for it"_ — but if you *really* want to play with it, you'll need Wine. Then you'll be running a Linux-targeted tool, ported to Windows using an abstraction layer (Cygwin runtime), via another abstraction layer (Wine) that will let you run this port on... Linux.
Score:1
gs flag

Cygwin is a compatibility layer that lets you run Linux programs on the Microsoft Windows operating systems. Ubuntu itself is a Linux operating system, so Linux programs run natively on it. You don't Cygwin.

Rsync might come preinstalled with Ubuntu. To check if you already have rsync installed, open a terminal (command prompt) and enter this command:

rsync --version

If you have it already installed you might get an output which tells you the version, and display a copyright notice and some other details. But if it is not installed it would say something like command rsync not found.

Rsync is available in the official repositories and so can be installed by giving the following commands:

sudo apt-get update
sudo apt-get install rsync -y

There are of course several other ways to do this, including compiling from source and what not.

Score:0
cn flag

You can install and build rsync from source for a variety of platforms.

https://github.com/WayneD/rsync/blob/master/INSTALL.md

This document on github tells you what environment you need to build various executables including Linux assorted flavors, MacOS, Cygwin, HP-UX, IBM AIX.

Short answer: you'll need a C compiler and some python packages to get the job done.

Score:-2
de flag

Others have explained how to install Ubuntu's rsync:

sudo apt install rsync

Here's why you don't need the Windows version. Your backup tool will be running under Wine, but Wine Is Not an Emulator; it will be running as a normal program on Ubuntu, and will be able to run other non-Wine programs normally if you add the contents of $PATH to the Wine %PATH%. (Remember to translate them to Wine filenames! /usr/bin becomes Z:\usr\bin, and so on.)

Unless you're running rsync.exe, your program won't be able to tell the difference. If you are running rsync.exe, a symbolic link (a type of shortcut) will do the trick; run:

ls -s /usr/bin/rsync rsync.exe

from a terminal (or a Run box) opened in a folder that's in the Wine %PATH%.

Installing Wine

Ubuntu provides Wine 3.0, but the latest Wine (at time of writing) is Wine 6.x. This means you should install Wine from WineHQ.

  1. Enable 32-bit support.

    sudo dpkg --add-architecture i386
    
  2. Add the Wine key. (Note the first capital -O and the second lower-case -o.)

    wget -O - -- https://dl.winehq.org/wine-builds/winehq.key |
    sudo -H gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg --dearmor -
    
  3. Add the Wine repository.

    sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main'
    
  4. Check the Wine repository for new packages.

    sudo apt update
    
  5. Install Wine (stable) and its helper programs.

    sudo apt install --install-recommends winehq-stable
    
  6. Configure Wine for your user.

    wine winecfg
    
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.