OpenWrt Forum Archive

Topic: how to install packages without internet?

The content of this topic has been archived between 19 Apr 2018 and 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Ok, i has read the #18, but # 18 is not only for the direct install OpenWRT packages without using the scp command?

Or it is to install the packages on another partition without being root?

Install libjpeg and libpthread before installing mjpg-streamer.

people after trying and trying...i just understand why i cant install this...if anyone have pacience to help me i appreciate...

root@OpenWrt:/tmp# opkg install kmod-usb-core_2.4.35.4-brcm-2.4-1_mipsel.ipk -d 
ram /dev/mtdblock/4
Multiple packages (kmod-usb-core and kmod-usb-core) providing same name marked HOLD or PREFER.  Using latest.
Installing kmod-usb-core (2.4.35.4-brcm-2.4-1) to ram...
Configuring kmod-usb-core
sed: 20-usb-core: No such file or directory
opkg_conf_write_status_files: Can't open status file: /dev/mtdblock/4//usr/lib/opkg/status for writing: Not a directory
Collected errors:
 * Cannot find package /dev/mtdblock/4.

my /etc/opkg.conf

src/gz snapshots http://mightyohm.com/files/kamikaze-2.4/packages/mipsel
dest root /
dest ram /tmp
dest /jffs /dev/mtdblock/4
lists_dir ext /var/opkg-lists

What is wrong now?

I'm trying install the USB storage for install de mpeg-streamer and other stuffs, but now just dont install...It say is installed, but it show this..

root@OpenWrt:/tmp# opkg list
(...)
kmod-usb-core - 2.4.35.4-brcm-2.4-1 - 
kmod-usb-ohci - 2.4.35.4-brcm-2.4-1 - 
kmod-usb-uhci - 2.4.35.4-brcm-2.4-1 - 
kmod-usb2 - 2.4.35.4-brcm-2.4-1 - 
(...)
pkg files kmod-fs-ext3_2.4.35.4-brcm-2.4-1_mipsel.ipk 
Collected errors:
 * Package kmod-fs-ext3_2.4.35.4-brcm-2.4-1_mipsel.ipk not installed.

Thanks..

(Last edited by zordlyon on 8 Dec 2011, 21:36)

People if anyone can tell me just some things, i thanks very much...

For asus wl520gu:
-Backfire 10.03.1 - rc4 - brcm47xx is the software recommended for transmitting video with a labtec cam?
-This firmware brings the packages for USB??
-Can i transmit the video via wireless with mjpg-streamer?

Please anyone help me with this questions...

Thanks..

zordlyon wrote:

Ok, i has read the #18, but # 18 is not only for the direct install OpenWRT packages without using the scp command?

What can you lose to give it a try?

What you need is a local host, which plays the role of download.openwrt.org, or saying "man-in-the-middle", that is connected to the internet and with nginx installed and configured.

I, first thanks for the response...


I have tried, but unsuccessfully, now first I need to know is what firmware I need to do.
I have been trying to do this in firmware brcm 2.4 kamikaze (Blending edge r12857) and I can not even install a few things and recognize a USB stick.

I'm thinking about changing the firmware mentioned above, but wanted to know if it is better suited to what I said, not to go try to do things that do not, then i ask for help...

Thanks..

Fyi, i have sucessed installed nginx on my pc and luci_hosts on 10.03.1 RC4 but i have a question how i connect the router to my pc? via lan1 or serial or SSH???

and more 1 question, the nginx is installed on my PC or on router?

Thanks..

(Last edited by zordlyon on 11 Dec 2011, 03:05)

Success means you can open 127.0.0.1/192.168.1.2 which is redirected to download.openwrt.org in the browser? It has nothing to do with the firmware you install.

My target is download.openwrt.org. What's yours? You don't have to modify opkg.conf.
My host is at 192.168.1.2. What's yours? It must connect to the internet to act as a reverse proxy.

Router (192.168.1.1) -> Host (nginx@192.168.1.2) -> download.openwrt.org

The next step is to tell the router/OpenWrt that download.openwrt.org is at 192.168.1.2. No files needed to be downloaded to local host. Just passing by.

Read #18 again. I don't think you understand what I'd done.

I begin to wonder what you meant "without internet". If no hosts can connect to the internet, then my method will not work. You have to download every files you need to a local host. But if you can connect to the internet, why not simply set it up in the router?

Edit:
Fine. I see you "do not want to change settings" but, did you modify opkg.conf to reflect "mightyohm.com" from "download.openwrt.org"? The uci commands I executed are not permanent unless you execute "uci commit". They can be reverted by "uci revert luci_hosts" and I'd said that.

If you follow my instructions, you don't have to worry about "package dependence". How do you know which files have to be installed before "mjpg-streamer"? I'd already told you that but you just didn't notice.

root@OpenWrt:~# opkg info mjpg-streamer
Package: mjpg-streamer
Version: r68-2
Depends: libpthread, libjpeg
Provides:
Status: unknown ok not-installed
Section: multimedia
Architecture: mips
maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: d561d7731c7409dcf481747d46443474
Size: 113891
Filename: mjpg-streamer_r68-2_mips.ipk
Source: feeds/packages/multimedia/mjpg-streamer
Description: Streaming application for Linux-UVC compatible webcams

(Last edited by fyi on 11 Dec 2011, 04:50)

I very thanks, one more time, the dependences is easy i think, because, if i need to install something, when i go install it, he tell me "dependencies required", right???

I changed the version of the OpenWRT "Kamikaze BRCM 2.4" to "backfire brcm47xx 10.03.1 rc4" this weekend, and have it installed the following packages:
-kmod-usb-core
-kmod-usb-ohci
-kmod-usb-storage
-kmod-usb-uhci
-kmod-usb2
-kmod-fs-ext3
-kmod-fs-mbcache
-kernel-2.6.32.25-1
-block-mount
-libblkid
-libopenssl
-libusb
-libuuid
-swap-utils
-usbtutils
-zlib

Initially i start installing the "Kmod-usb-*" and he asked for dependencies, then i go to the site "http://downloads.openwrt.org/backfire/1 … /packages/" and i download the dependencie required and send to the router via Scp <package> <router> :/tmp and install it...

In this way work on same way right??

Or there are other dependencies and they are not asked??

Thanks one more time, if I lived at your side would pay you a drink .. wink

(Last edited by zordlyon on 11 Dec 2011, 18:58)

zordlyon wrote:

In this way work on same way right??

Yes.

Now, i'm trying install packages on USB stick, but unsucessfully...what i have when i reboot the router is this:

SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd ssb0:1: SSB OHCI Controller
ohci_hcd ssb0:1: new USB bus registered, assigned bus number 1
ohci_hcd ssb0:1: irq 6, io mem 0x18003000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd ssb0:1: SSB EHCI Controller
ohci_hcd ssb0:1: new USB bus registered, assigned bus number 2
ohci_hcd ssb0:1: irq 6, io mem 0x18003800
ohci_hcd ssb0:1: USB 0.0 started, EHCI 1.00
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 2-1: new high speed USB device using ohci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
scsi 0:0:0:0: Direct-Access              USB Flash Memory 1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 2002944 512-byte logical blocks: (1.02 GB/978 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

And then i do this:

root@OpenWrt:/# mount -t ext3 /dev/sda1 /mnt/share -o rw,sync
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with writeback data mode.

I went to "/ etc / opkg.conf" and put "dest usb / mnt / share"

Then i try install a package on USB and i got the error:

root@OpenWrt:/tmp# opkg install libjpeg_6b-1_brcm47xx.ipk -d usb /mnt/share
Installing libjpeg (6b-1) to usb...
Unknown package '/mnt/share'.
Configuring libjpeg.
Collected errors:
 * opkg_conf_parse_file: /etc/opkg.conf:5: Ignoring invalid line: `text /var/opkg-li
sts'
 * opkg_install_cmd: Cannot install package /mnt/share.

What i have on /etc/opkg.conf is this:

src/gz packages http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm47xx/packa
dest root /
dest ram /tmp
dest usb /mnt/share
text /var/opkg-lists
option overlay_root /overlay

And what i have in /etc/config/fstab is:

"/etc/config/fstab" 20L, 406C



config 'global' 'automount'
        option 'from_fstab' '1'
        option 'anon_mount' '1'

config 'global' 'autoswap'
        option 'from_fstab' '1'
        option 'anon_swap' '0'

config 'mount'
        option 'device' '/dev/sda1'
        option 'fstype' 'ext3'
        option 'options' 'rw,sync'
        option 'enabled' '1'
        option 'enabled_fsck' '0'
        option 'target' '/mnt/share'

config 'swap'
        option 'device' '/dev/sda1'
        option 'enabled' '1'

And running "df" i have this:

root@OpenWrt:/tmp# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1920      1920         0 100% /rom
tmpfs                     6696       112      6584   2% /tmp
tmpfs                      512         0       512   0% /dev
/dev/mtdblock3            1152       952       200  83% /overlay
mini_fo:/overlay          1920      1920         0 100% /
/dev/sda1               980308     16588    913924   2% /mnt/share

The packages i have installed is above...

What is wrong?

Thanks..

(Last edited by zordlyon on 11 Dec 2011, 22:56)

Unsucess...i have followed this for extroot:

Duplicate data

Copy necessary files from flash to the new root partition:
For pivot overlay you can either use an empty new rootfs OR copy the contents of the current overlay (JFFS2) to the new rootfs (assuming the filesystem for the new external rootfs is mounted on /mnt/sda1):
tar -C /overlay -cvf - . | tar -C /mnt/sda1 -xf -
For pivot root (only possible as of r26109!) you must make sure to have a complete root filesystem on the external rootfs device. One possible way to get such a system (assuming the filesystem for the new external rootfs is mounted on /mnt/sda1) is to issue
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot

And i got this:

root@OpenWrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1920      1920         0 100% /rom
tmpfs                     6696        52      6644   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1               980308     37548    892964   4% /overlay
mini_fo:/overlay          1920      1920         0 100% /

but when i try install i got:

root@OpenWrt:/tmp# opkg install libjpeg_6b-1_brcm47xx.ipk -d usb /overlay
Installing libjpeg (6b-1) to ram...
Unknown package '/overlay'.
Configuring libjpeg.
Collected errors:
 * opkg_conf_parse_file: /etc/opkg.conf:5: Ignoring invalid line: `text /var/opkg-li
sts'
 * opkg_install_cmd: Cannot install package /overlay.

if anyone can help...

Thanks...

(Last edited by zordlyon on 11 Dec 2011, 23:45)

At the top of each post there is a header - date and time on left, sequence number of the post in thread on right.
#18 - scroll back to post #18 in this thread.
Took me a minute to tumble to what fyi was saying, as I had not really looked at the layout of the postings. You learn something new every day.

(Last edited by zzz2002 on 15 Dec 2011, 10:12)

Or the way I do it:

1) setup a local web server in your LAN (subnet)

2) put the package repository in there

3) change /etc/opkg.conf on the router to point to your local package repository

4) install packages as you do normally with: opkg update; opkg install foobar

Thank you but i have some errors as exemple :

Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for ebtables:
*      kmod-ebtables *
* opkg_install_cmd: Cannot install package ebtables.
root@OpenWrt:~# opkg install 63.ipk
Collected errors:
* wfopen: 63.ipk: No such file or directory.
* pkg_init_from_file: Failed to extract control file from 63.ipk.
root@OpenWrt:~# opkg install luci5.ipk
Collected errors:
* wfopen: luci5.ipk: No such file or directory.
* pkg_init_from_file: Failed to extract control file from luci5.ipk.
root@OpenWrt:~# opkg install fconfig.ipk
Collected errors:
* wfopen: fconfig.ipk: No such file or directory.
* pkg_init_from_file: Failed to extract control file from fconfig.ipk.
root@OpenWrt:~#

I have checked and it doesn't seem to be a caching issue as I have implemented both the cache_control and randomstr solution to make sure each request is unique. I've included the code below for getting the data and decoding the JSON string. Anyone have any ideas?
internet jobs in pakistan

You can get the help from this site also.. ie openwrt...
There are also so many informations available on many sites in the Internet so you can visit for this.

fyi wrote:

Install "nginx" as a Reverse Proxy Server on a local host @192.168.1.2.

http://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Reverse_proxy_h2g2bob.svg/280px-Reverse_proxy_h2g2bob.svg.png
A reverse proxy taking requests from the Internet and forwarding them to servers in an internal network. Those making requests connect to the proxy and may not be aware of the internal network.

Modify ./nginx/conf/nginx.conf,

server {
    listen    80;
    server_name    localhost;
#    location / {
#        root    html;
#        index    index.html index.htm;
#    }
    location / {
        proxy_pass    http://downloads.openwrt.org/;
        proxy_redirect    default;
    }
}

and start nginx. Start a browser and visit http://192.168.1.2 or http://127.0.0.1 to see if it works.

Reference: ProxyNagios

On OpenWrt,

root@OpenWrt:~# uci add luci_hosts host
cfg02fe63
root@OpenWrt:~# uci set luci_hosts.@host[-1].hostname=downloads.openwrt.org
root@OpenWrt:~# uci set luci_hosts.@host[-1].ipaddr=192.168.1.2
root@OpenWrt:~# uci export luci_hosts
package 'luci_hosts'

config 'host'
        option 'hostname' 'downloads.openwrt.org'
        option 'ipaddr' '192.168.1.2'

root@OpenWrt:~# /etc/init.d/luci_hosts restart
root@OpenWrt:~# ping -c 1 downloads.openwrt.org
PING downloads.openwrt.org (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=1.662 ms

--- downloads.openwrt.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.662/1.662/1.662 ms
root@OpenWrt:~# cat /etc/opkg.conf
src/gz snapshots http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /jffs
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/Packages.gz
Connecting to downloads.openwrt.org (192.168.1.2:80)
Packages.gz          100% |*******************************|   142k 00:00:00 ETA
Inflating http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/snapshots
root@OpenWrt:~# opkg install mjpg-streamer
Installing mjpg-streamer (r68-2) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/mjpg-streamer_r68-2_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
mjpg-streamer_r68-2_ 100% |*******************************|   111k 00:00:00 ETA
Installing libpthread (0.9.29-14.3) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/libpthread_0.9.29-14.3_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
libpthread_0.9.29-14 100% |*******************************| 19212  00:00:00 ETA
Installing libjpeg (6b-1) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/libjpeg_6b-1_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
libjpeg_6b-1_mips.ip 100% |*******************************| 57891  00:00:00 ETA
Configuring libjpeg
Configuring libpthread
Configuring mjpg-streamer

To revert luci_hosts configuration,

root@OpenWrt:~# uci revert luci_hosts

In this way, you don't have to worry about package dependence.

Edit:
There's no need to alter LAN gateway. The "ping" after "luci_hosts restart" had proved it.

Using Kamikaze 8.09.2 everything works up until opkg update which says:

Downloading http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/Packages.gz
Connecting to downloads.openwrt.org (127.0.0.1:80)
wget: server returned error: HTTP/1.0 404 Not Found
Collected errors:
 * opkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp    -P /tmp/opkg-mzggPl http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/Packages.gz'

I can ping downloads.openwrt.org okay:

root@OpenWrt:~# ping -c 1 downloads.openwrt.org
PING downloads.openwrt.org (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=1.054 ms

--- downloads.openwrt.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.054/1.054/1.054 ms

Sorry if bumping old topics is frowned on.

(Last edited by charlie_slh on 24 Feb 2015, 18:22)

The discussion might have continued from here.