LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing package from repository (https://www.linuxquestions.org/questions/linux-software-2/installing-package-from-repository-4175650240/)

AnneRanch 03-15-2019 11:29 AM

Installing package from repository
 
My objective is to install bluez package for ARM architecture.

These are some steps I have took so far:

Quote:

Identify bluez source in repository
pi@pi:~ $ apt-cache policy bluez
bluez:
Installed: 5.43-2+rpt2+deb9u2
Candidate: 5.43-2+rpt2+deb9u2
Version table:
*** 5.43-2+rpt2+deb9u2 500
500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
100 /var/lib/dpkg/status
5.43-2+deb9u1+b5 500
500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
pi@pi:~ $
The above tells me that "bluez" was installed from two different repositories.

1. I do not understand what the "500" "100" is telling me.
2. Where is the package name ? All I get is "version"

I did try this, but did not expect success:


Quote:

pi@pi:~ $ sudo wget -P /TEMP_BLUEZ http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages 5.43-2+rpt2+deb9u2
--2019-03-15 16:18:25-- http://raspbian.raspberrypi.org/raspbian
Resolving raspbian.raspberrypi.org (raspbian.raspberrypi.org)... 93.93.128.193, 2a00:1098:0:80:1000:75:0:3
Connecting to raspbian.raspberrypi.org (raspbian.raspberrypi.org)|93.93.128.193|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://raspbian.raspberrypi.org/raspbian/ [following]
--2019-03-15 16:18:25-- http://raspbian.raspberrypi.org/raspbian/
Connecting to raspbian.raspberrypi.org (raspbian.raspberrypi.org)|93.93.128.193|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1302 (1.3K) [text/html]
Saving to: '/TEMP_BLUEZ/raspbian.2'

raspbian.2 100%[==========================================================>] 1.27K --.-KB/s in 0s

2019-03-15 16:18:25 (43.0 MB/s) - '/TEMP_BLUEZ/raspbian.2' saved [1302/1302]

--2019-03-15 16:18:25-- http://stretch/main
Resolving stretch (stretch)... failed: Name or service not known.
wget: unable to resolve host address 'stretch'
--2019-03-15 16:18:25-- http://armhf/
Resolving armhf (armhf)... failed: Name or service not known.
wget: unable to resolve host address 'armhf'
--2019-03-15 16:18:25-- http://packages/
Resolving packages (packages)... failed: Name or service not known.
wget: unable to resolve host address 'packages'
--2019-03-15 16:18:25-- http://5.43-2+rpt2+deb9u2/
Resolving 5.43-2+rpt2+deb9u2 (5.43-2+rpt2+deb9u2)... failed: Name or service not known.
wget: unable to resolve host address '5.43-2+rpt2+deb9u2'
FINISHED --2019-03-15 16:18:25--
Total wall clock time: 0.6s
Downloaded: 1 files, 1.3K in 0s (43.0 MB/s)

Wget connected to specified (?) repository, but did not find , as expected , the required package.

Since it failed I did not bother to check the contents of /TEMP_BLUEZ/raspbian.2

Any suggestion how to make the Wget call successful in downloading the ARM version of "bluez" would be greatly appreciated.

jsbjsb001 03-15-2019 11:36 AM

Quote:

Originally Posted by AnneRanch (Post 5974176)
My objective is to install bluez package for ARM architecture.
These are some steps I have took so far:
...

Your machine is actually ARM architecture isn't it ? Because if it isn't, then the "bluez" package won't work on a different architecture.

Quote:

The above tells me that "bluez" was installed from two different repositories.
I don't think it is actually. I think it's telling you what's available.

scasey 03-15-2019 12:01 PM

Code:

$ sudo wget -P /TEMP_BLUEZ http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages 5.43-2+rpt2+deb9u2
The spaces are causing wget to treat each word as a seperate URL. The errors are very clear about that.
Code:

--2019-03-15 16:18:25-- http://stretch/main
Resolving stretch (stretch)... failed: Name or service not known.
wget: unable to resolve host address 'stretch'
--2019-03-15 16:18:25-- http://armhf/
Resolving armhf (armhf)... failed: Name or service not known.
wget: unable to resolve host address 'armhf'
--2019-03-15 16:18:25-- http://packages/
Resolving packages (packages)... failed: Name or service not known.
wget: unable to resolve host address 'packages'
--2019-03-15 16:18:25-- http://5.43-2+rpt2+deb9u2/
Resolving 5.43-2+rpt2+deb9u2 (5.43-2+rpt2+deb9u2)... failed: Name or service not known.
wget: unable to resolve host address '5.43-2+rpt2+deb9u2'


TB0ne 03-15-2019 12:14 PM

Quote:

Originally Posted by scasey (Post 5974195)
Code:

$ sudo wget -P /TEMP_BLUEZ http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages 5.43-2+rpt2+deb9u2
The spaces are causing wget to treat each word as a seperate URL. The errors are very clear about that.
Code:

--2019-03-15 16:18:25-- http://stretch/main
Resolving stretch (stretch)... failed: Name or service not known.
wget: unable to resolve host address 'stretch'
--2019-03-15 16:18:25-- http://armhf/
Resolving armhf (armhf)... failed: Name or service not known.
wget: unable to resolve host address 'armhf'
--2019-03-15 16:18:25-- http://packages/
Resolving packages (packages)... failed: Name or service not known.
wget: unable to resolve host address 'packages'
--2019-03-15 16:18:25-- http://5.43-2+rpt2+deb9u2/
Resolving 5.43-2+rpt2+deb9u2 (5.43-2+rpt2+deb9u2)... failed: Name or service not known.
wget: unable to resolve host address '5.43-2+rpt2+deb9u2'


Seems like familiar ground: https://www.linuxquestions.org/quest...ez-4175649889/

AnneRanch 03-15-2019 12:20 PM

Quote:

Originally Posted by jsbjsb001 (Post 5974182)
Your machine is actually ARM architecture isn't it ? Because if it isn't, then the "bluez" package won't work on a different architecture.

That is immaterial for this post - all I need is to be able to retrieve the package for now.


I don't think it is actually. I think it's telling you what's available.

Not according to apt - the command used shows what is / was installed and from where.
The "error" is - it does not identify the package name - just version.
I need to go back to apt man to see if it has an option to identify the package name.

Come to think of it - the best approach would be to be able to read just the repository packages tree.
I have managed to retrieve the entire contents of "Packages" ( plain text) - but it is unmanageable , way too big.

I'll try this next
purge bluez
install bluez

The "install " give the repository link where the package was installed from

then I can try another Wget using that repository

sorry I missed scasey post


Got to run Later

jsbjsb001 03-15-2019 12:26 PM

I think you need to learn to read manual pages and/or learn how to Google things properly, because you don't seem to have a very good grasp on what you're doing/trying to do. And you've included part of your reply in the quote of what I posted before.

You have not even said which Linux distribution you're using...

michaelk 03-15-2019 03:12 PM

Looks like distribution / version is rasbpian stretch

From the apt_preferences man page
Quote:

priority 100
to the version that is already installed (if any) and to the
versions coming from archives which in their Release files are
marked as "NotAutomatic: yes" and "ButAutomaticUpgrades: yes" like
the Debian backports archive since squeeze-backports.

priority 500
to the versions that are not installed and do not belong to the
target release.
Another command to see what is installed.

sudo dpkg -l bluez

AnneRanch 03-15-2019 04:14 PM

Quote:

Originally Posted by scasey (Post 5974195)
Code:

$ sudo wget -P /TEMP_BLUEZ http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages 5.43-2+rpt2+deb9u2
The spaces are causing wget to treat each word as a seperate URL. The errors are very clear about that.
Code:

--2019-03-15 16:18:25-- http://stretch/main
Resolving stretch (stretch)... failed: Name or service not known.
wget: unable to resolve host address 'stretch'
--2019-03-15 16:18:25-- http://armhf/
Resolving armhf (armhf)... failed: Name or service not known.
wget: unable to resolve host address 'armhf'
--2019-03-15 16:18:25-- http://packages/
Resolving packages (packages)... failed: Name or service not known.
wget: unable to resolve host address 'packages'
--2019-03-15 16:18:25-- http://Obviously /
Resolving 5.43-2+rpt2+deb9u2 (5.43-2+rpt2+deb9u2)... failed: Name or service not known.
wget: unable to resolve host address '5.43-2+rpt2+deb9u2'



Thanks , this may lead to the solution.

I can use option "-i" in wget command to retrieve multiple packages, but I need only one anyway.
However, I am still unable to figure out the correct syntax to "wget" bluez package from repository.

Obviously "5.43-2+rpt2+deb9u2" is not correct, neither is "bluez-5.43-2+rpt2+deb9u2".
I'll keep guessing for now, unless there is away to retieve the name from the repository.
Thanks
Appreciate the reply.

michaelk 03-15-2019 04:23 PM

Why use wget versus the package manager utilities i.e apt or apt-get?

sudo apt-cache search bluez will find all packages that contain the word bluez.

sudo apt-get install bluez will install bluez packages.

scasey 03-15-2019 04:33 PM

From man wget:
Quote:

GNU Wget is a free utility for non-interactive download of files from the Web.
It doesn't "retrieve packages", it downloads files.
Arguments to wget are in the form of URLs
As you can see by the errors you got, it adds http:// to a string if it's not there, but the argument should contain, at a minimum, a complete, valid domain name.

Yes, a file being downloaded could contain a package, but you should be using your package manager (apt, yum, etc.) to install packages, not wget.

[I had to pause to answer the phone, so didn't see michaelk's post...]

AnneRanch 03-15-2019 05:14 PM

Yet another attempt to identify the package name required by wget:

pi@pi:~ $ sudo wget -P /TEMP_BLUEZ -i http://raspbian.raspberrypi.org/rasp...armhf/Packages bluez

I am assuming this info was retrieved during the actaull APt install bluez " FROM repository.


Quote:

pi@pi:~ $ dpkg -s bluez
Package: bluez
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 3368
Maintainer: Debian Bluetooth Maintainers <pkg-bluetooth-maintainers@lists.alioth.debian.org>
Architecture: armhf
Multi-Arch: foreign
Version: 5.43-2+rpt2+deb9u2
Replaces: bluez-audio (<= 3.36-3), bluez-input, bluez-network, bluez-serial, bluez-utils (<= 3.36-3), udev (<< 170-1)
Depends: libc6 (>= 2.15), libdbus-1-3 (>= 1.9.14), libglib2.0-0 (>= 2.31.8), libreadline7 (>= 6.0), libudev1 (>= 196), init-system-helpers (>= 1.18~), kmod, udev (>= 170-1), lsb-base, dbus
Suggests: pulseaudio-module-bluetooth
Breaks: udev (<< 170-1)
Conflicts: bluez-audio (<= 3.36-3), bluez-utils (<= 3.36-3)
Conffiles:
/etc/bluetooth/input.conf 9f85017f861ac34d983fa76fa715f9c3
/etc/bluetooth/main.conf b770cbea6fc8a3b0dfc04e0c0e9f9fa3
/etc/bluetooth/network.conf 0c7497c405b963382ff71789d0730abd
/etc/bluetooth/proximity.conf b75823a140e00905d41465c380bf89fe
/etc/dbus-1/system.d/bluetooth.conf 2fd2de572a1221533e707d058e64e33a
/etc/default/bluetooth 1e25cf981f29147187311b94f8e0ea89
/etc/init.d/bluetooth 1d503f26c72a83c43b90422ec5907626
Description: Bluetooth tools and daemons
This package contains tools and system daemons for using Bluetooth devices.
.
BlueZ is the official Linux Bluetooth protocol stack. It is an Open Source
project distributed under GNU General Public License (GPL).
Homepage: http://www.bluez.org
pi@pi:~ $ sudo wget -P /TEMP_BLUEZ -i http://raspbian.raspberrypi.org/rasp...armhf/Packages bluez --2019-03-15 22:06:40-- http://bluez/
Resolving bluez (bluez)... failed: Name or service not known.
wget: unable to resolve host address 'bluez'
--2019-03-15 22:06:40-- http://raspbian.raspberrypi.org/rasp...armhf/Packages
Resolving raspbian.raspberrypi.org (raspbian.raspberrypi.org)... 93.93.128.193, 2a00:1098:0:80:1000:75:0:3
Connecting to raspbian.raspberrypi.org (raspbian.raspberrypi.org)|93.93.128.193|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 61533162 (59M)
Saving to: '/TEMP_BLUEZ/Packages.5'

Packages.5 100%[==========================================================>] 58.68M 1.35MB/s in 72s

2019-03-15 22:07:52 (838 KB/s) - '/TEMP_BLUEZ/Packages.5' saved [61533162/61533162]

--2019-03-15 22:07:52-- http://raspbian.raspberrypi.org/rasp...ary-armhf/href
Connecting to raspbian.raspberrypi.org (raspbian.raspberrypi.org)|93.93.128.193|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-03-15 22:07:53 ERROR 404: Not Found.

FINISHED --2019-03-15 22:07:53--
Total wall clock time: 1m 13s
Downloaded: 1 files, 59M in 1m 12s (838 KB/s)
pi@pi:~ $



descendant_command 03-15-2019 05:25 PM

FFS - use code boxes for code, not 'quote'.

Quote:

Originally Posted by AnneRanch (Post 5974176)
My objective is to install bluez package for ARM architecture.

It already IS...
Code:

pi@pi:~ $ apt-cache policy bluez
bluez:                            <--- Package name.
Installed: 5.43-2+rpt2+deb9u2      <--- version *currently installed*
Candidate: 5.43-2+rpt2+deb9u2      <--- *best* available version from all sources
Version table:
*** 5.43-2+rpt2+deb9u2 500        <--- this version available from below sources
500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
100 /var/lib/dpkg/status
5.43-2+deb9u1+b5 500              <--- this version available from below sources
500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages

The 500/100 is the priority - basically, highest wins - see man apt.

AnneRanch 03-15-2019 05:25 PM

Quote:

Originally Posted by scasey (Post 5974269)
From man wget:

It doesn't "retrieve packages", it downloads files.
Arguments to wget are in the form of URLs
As you can see by the errors you got, it adds http:// to a string if it's not there, but the argument should contain, at a minimum, a complete, valid domain name.

Yes, a file being downloaded could contain a package, but you should be using your package manager (apt, yum, etc.) to install packages, not wget.

[I had to pause to answer the phone, so didn't see michaelk's post...]

I cannot use apt-get because it does not recognize "-a=architecture " option.

This is a hack - I am doing this as an interim step so I can get the "bluez" package for ARM architecture running wget from X86 architecture.

It is imperative that I can specify the package name in wget - which so far is eluding me.

The repository is "architecture sensitive" and that is all I care for now.


Addendum
wget is the correct way to accomplish the task, the PROBLEM is that wget processes FILE(s) and "bluez" is PACKAGE NAME , not a file.

scasey 03-15-2019 06:39 PM

Quote:

Originally Posted by AnneRanch (Post 5974286)
I cannot use apt-get because it does not recognize "-a=architecture " option.

This is a hack - I am doing this as an interim step so I can get the "bluez" package for ARM architecture running wget from X86 architecture.

It is imperative that I can specify the package name in wget - which so far is eluding me.

The repository is "architecture sensitive" and that is all I care for now.

Not sure why you feel a need to yell...

The current package can be found at http://www.bluez.org/download/packag...ez-5.50.tar.xz

You really need to work on your web searching skills, has been repeatedly pointed out to you.
I entered bluez into a search engine. www.bluez.org is the first non-ad link.

Or, maybe, this is what you want


All times are GMT -5. The time now is 12:53 PM.