linux下 firefox安装flash debug …

本文详细介绍了在Linux Ubuntu系统中搜索、下载、解压Flash Debug所需包,并指导如何选择合适的安装方式,最终定位到安装目录及插件存放位置。同时,通过查找依赖关系,解决权限问题,确保Flash Debug组件正确安装并运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

linux 版本 Unbuntu 


搜索 flash debug 的官方下载路径 选择合适自己OS的包

解压后 有个readme.txt 选择你自己的安装方式


whereis firefox
firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz

 

现在可以确定它在/usr下面了,再找下安装目录

 

#find /usr -name firefox

/usr/bin/firefox

 

哎呀,没找到,/usr/bin/firefox这个是程序,不是目录

。。。不要忘了firefox的全名是Mozilla Firefox,继续找

 

#find /usr -name mozilla

/usr/lib/mozilla
/usr/share/mozilla


2.查看plugins到底放在哪

 

ls /usr/share/mozilla
extensions

 

这个没有,下一个

 

ls /usr/lib/mozilla
extensions  plugins  


OK,找到插件目录/usr/lib/mozilla/plugins

  
3.解压安装包install_flash_player_11_linux.i386.tar.gz,找到libflashplayer.so

 

复制libflashplayer.so到firefox插件目录下

 

#cp flash_source_path/libflashplayer.so /usr/lib/mozilla/plugins

权限问题 

#sudo cp libflashplayer.so /usr/lib/mozilla/plugins



4.各种依赖关系

ldd /usr/lib/mozilla/plugins/libflashplayer.so

n@danssion-PC plugins]$ ldd ./libflashplayer.so 

        linux-gate.so.1 =>  (0xf7741000)

        libgthread-2.0.so.0 => not found

        libX11.so.6 => not found

        libXext.so.6 => not found

        libXt.so.6 => not found

        librt.so.1 => /lib32/librt.so.1 (0xf63fb000)

        libXcursor.so.1 => not found

        libXrender.so.1 => not found

        libssl3.so => not found

        libsmime3.so => not found

        libnss3.so => not found

        libnssutil3.so => not found

        libplds4.so => not found

        libplc4.so => not found

        libnspr4.so => not found

        libpthread.so.0 => /lib32/libpthread.so.0 (0xf63de000)

        libdl.so.2 => /lib32/libdl.so.2 (0xf63d8000)

        libgtk-x11-2.0.so.0 => not found

        libgdk-x11-2.0.so.0 => not found

        libatk-1.0.so.0 => not found

        libpangoft2-1.0.so.0 => not found

        libgdk_pixbuf-2.0.so.0 => not found

        libpangocairo-1.0.so.0 => not found

        libcairo.so.2 => not found

        libpango-1.0.so.0 => not found

        libfreetype.so.6 => not found

        libfontconfig.so.1 => not found

        libgobject-2.0.so.0 => not found

        libgmodule-2.0.so.0 => not found

        libglib-2.0.so.0 => not found

        libm.so.6 => /lib32/libm.so.6 (0xf63ab000)

        libc.so.6 => /lib32/libc.so.6 (0xf6203000)

        /lib/ld-linux.so.2 (0xf7742000)


没有的 你都补全吧 ~!^_^ ^_^





I would like to 2x check, this would be the code in my cart.php <?php defined(&#39;ABSPATH&#39;) || exit; do_action(&#39;woocommerce_before_cart&#39;); ?> <style> .cart-container { max-width: 1024px; margin: 0 auto; padding: 20px; } .cart-footer { position: sticky; bottom: 0; background: white; padding: 15px; border-top: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); } .cart-footer-left { display: flex; align-items: center; gap: 15px; } .cart-footer-right { display: flex; align-items: center; gap: 15px; } .selected-info { font-weight: bold; } .checkout-btn { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; } .cart-actions { margin: 20px 0; display: flex; gap: 10px; } .action-btn { padding: 8px 15px; background: #f1f1f1; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; } .action-btn:hover { background: #e9e9e9; } </style> <div class="cart-container"> <form class="woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post"> <?php do_action(&#39;woocommerce_before_cart_table&#39;); ?> <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0"> <thead> <tr> <th class="product-select"><input type="checkbox" id="select-all"></th> <th class="product-name"><?php esc_html_e(&#39;Product&#39;, &#39;woocommerce&#39;); ?></th> <th class="product-attributes"><?php esc_html_e(&#39;Attributes&#39;, &#39;woocommerce&#39;); ?></th> <th class="product-price"><?php esc_html_e(&#39;Price&#39;, &#39;woocommerce&#39;); ?></th> <th class="product-quantity"><?php esc_html_e(&#39;Quantity&#39;, &#39;woocommerce&#39;); ?></th> <th class="product-subtotal"><?php esc_html_e(&#39;Subtotal&#39;, &#39;woocommerce&#39;); ?></th> <th class="product-remove"><?php esc_html_e(&#39;Action&#39;, &#39;woocommerce&#39;); ?></th> </tr> </thead> <tbody> <?php do_action(&#39;woocommerce_before_cart_contents&#39;); ?> <?php foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) { $_product = apply_filters(&#39;woocommerce_cart_item_product&#39;, $cart_item[&#39;data&#39;], $cart_item, $cart_item_key); $product_id = apply_filters(&#39;woocommerce_cart_item_product_id&#39;, $cart_item[&#39;product_id&#39;], $cart_item, $cart_item_key); if ($_product && $_product->exists() && $cart_item[&#39;quantity&#39;] > 0 && apply_filters(&#39;woocommerce_cart_item_visible&#39;, true, $cart_item, $cart_item_key)) { $product_permalink = apply_filters(&#39;woocommerce_cart_item_permalink&#39;, $_product->is_visible() ? $_product->get_permalink($cart_item) : &#39;&#39;, $cart_item, $cart_item_key); ?> <tr class="woocommerce-cart-form__cart-item <?php echo esc_attr(apply_filters(&#39;woocommerce_cart_item_class&#39;, &#39;cart_item&#39;, $cart_item, $cart_item_key)); ?>"> <!-- 选择框 --> <td class="product-select"> <input type="checkbox" name="selected_items[]" value="<?php echo $cart_item_key; ?>" class="item-checkbox"> </td> <!-- 商品图片和名称 --> <td class="product-name" data-title="<?php esc_attr_e(&#39;Product&#39;, &#39;woocommerce&#39;); ?>"> <?php $thumbnail = apply_filters(&#39;woocommerce_cart_item_thumbnail&#39;, $_product->get_image(), $cart_item, $cart_item_key); if (!$product_permalink) { echo $thumbnail; // PHPCS: XSS ok. } else { printf(&#39;<a href="%s">%s</a>&#39;, esc_url($product_permalink), $thumbnail); // PHPCS: XSS ok. } ?> <div class="product-info"> <?php if (!$product_permalink) { echo wp_kses_post(apply_filters(&#39;woocommerce_cart_item_name&#39;, $_product->get_name(), $cart_item, $cart_item_key) . &#39;&nbsp;&#39;); } else { echo wp_kses_post(apply_filters(&#39;woocommerce_cart_item_name&#39;, sprintf(&#39;<a href="%s">%s</a>&#39;, esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key)); } do_action(&#39;woocommerce_after_cart_item_name&#39;, $cart_item, $cart_item_key); // Meta data. echo wc_get_formatted_cart_item_data($cart_item); // PHPCS: XSS ok. // Backorder notification. if ($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item[&#39;quantity&#39;])) { echo wp_kses_post(apply_filters(&#39;woocommerce_cart_item_backorder_notification&#39;, &#39;<p class="backorder_notification">&#39; . esc_html__(&#39;Available on backorder&#39;, &#39;woocommerce&#39;) . &#39;</p>&#39;, $product_id)); } ?> </div> </td> <!-- 商品参数 --> <td class="product-attributes" data-title="<?php esc_attr_e(&#39;Attributes&#39;, &#39;woocommerce&#39;); ?>"> <?php // 显示自定义属性 $attributes = $_product->get_attributes(); if ($attributes) { foreach ($attributes as $attribute) { if ($attribute->get_visible()) { echo &#39;<div>&#39;.wc_attribute_label($attribute->get_name()).&#39;: &#39;; $values = array(); if ($attribute->is_taxonomy()) { $attribute_taxonomy = $attribute->get_taxonomy_object(); $attribute_values = wc_get_product_terms($product_id, $attribute->get_name(), array(&#39;fields&#39; => &#39;all&#39;)); foreach ($attribute_values as $attribute_value) { $value_name = esc_html($attribute_value->name); $values[] = $value_name; } } else { $values = $attribute->get_options(); foreach ($values as &$value) { $value = esc_html($value); } } echo apply_filters(&#39;woocommerce_attribute&#39;, wptexturize(implode(&#39;, &#39;, $values)), $attribute, $values); echo &#39;</div>&#39;; } } } ?> </td> <!-- 单价 --> <td class="product-price" data-title="<?php esc_attr_e(&#39;Price&#39;, &#39;woocommerce&#39;); ?>"> <?php echo apply_filters(&#39;woocommerce_cart_item_price&#39;, WC()->cart->get_product_price($_product), $cart_item, $cart_item_key); // PHPCS: XSS ok. ?> </td> <!-- 数量 --> <td class="product-quantity" data-title="<?php esc_attr_e(&#39;Quantity&#39;, &#39;woocommerce&#39;); ?>"> <?php if ($_product->is_sold_individually()) { $product_quantity = sprintf(&#39;1 <input type="hidden" name="cart[%s][qty]" value="1" />&#39;, $cart_item_key); } else { $product_quantity = woocommerce_quantity_input( array( &#39;input_name&#39; => "cart[{$cart_item_key}][qty]", &#39;input_value&#39; => $cart_item[&#39;quantity&#39;], &#39;max_value&#39; => $_product->get_max_purchase_quantity(), &#39;min_value&#39; => &#39;0&#39;, &#39;product_name&#39; => $_product->get_name(), ), $_product, false ); } echo apply_filters(&#39;woocommerce_cart_item_quantity&#39;, $product_quantity, $cart_item_key, $cart_item); // PHPCS: XSS ok. ?> </td> <!-- 小计 --> <td class="product-subtotal" data-title="<?php esc_attr_e(&#39;Subtotal&#39;, &#39;woocommerce&#39;); ?>"> <?php echo apply_filters(&#39;woocommerce_cart_item_subtotal&#39;, WC()->cart->get_product_subtotal($_product, $cart_item[&#39;quantity&#39;]), $cart_item, $cart_item_key); // PHPCS: XSS ok. ?> </td> <!-- 移除按钮 --> <td class="product-remove"> <?php echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped &#39;woocommerce_cart_item_remove_link&#39;, sprintf( &#39;<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>&#39;, esc_url(wc_get_cart_remove_url($cart_item_key)), esc_html__(&#39;Remove this item&#39;, &#39;woocommerce&#39;), esc_attr($product_id), esc_attr($_product->get_sku()) ), $cart_item_key ); ?> </td> </tr> <?php } } ?> <?php do_action(&#39;woocommerce_cart_contents&#39;); ?> <tr> <td colspan="7" class="actions"> <div class="cart-actions"> <button type="button" class="action-btn" id="remove-selected"><?php esc_html_e(&#39;Delete Selected&#39;, &#39;woocommerce&#39;); ?></button> <button type="button" class="action-btn" id="clear-cart"><?php esc_html_e(&#39;Clear Cart&#39;, &#39;woocommerce&#39;); ?></button> </div> <?php if (wc_coupons_enabled()) { ?> <div class="coupon"> <label for="coupon_code"><?php esc_html_e(&#39;Coupon:&#39;, &#39;woocommerce&#39;); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e(&#39;Coupon code&#39;, &#39;woocommerce&#39;); ?>" /> <button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e(&#39;Apply coupon&#39;, &#39;woocommerce&#39;); ?>"><?php esc_attr_e(&#39;Apply coupon&#39;, &#39;woocommerce&#39;); ?></button> <?php do_action(&#39;woocommerce_cart_coupon&#39;); ?> </div> <?php } ?> <button type="submit" class="button" name="update_cart" value="<?php esc_attr_e(&#39;Update cart&#39;, &#39;woocommerce&#39;); ?>"><?php esc_html_e(&#39;Update cart&#39;, &#39;woocommerce&#39;); ?></button> <?php do_action(&#39;woocommerce_cart_actions&#39;); ?> <?php wp_nonce_field(&#39;woocommerce-cart&#39;, &#39;woocommerce-cart-nonce&#39;); ?> </td> </tr> <?php do_action(&#39;woocommerce_after_cart_contents&#39;); ?> </tbody> </table> <?php do_action(&#39;woocommerce_after_cart_table&#39;); ?> </form> <!-- 底部固定栏 --> <div class="cart-footer"> <div class="cart-footer-left"> <input type="checkbox" id="footer-select-all"> <label for="footer-select-all"><?php esc_html_e(&#39;Select all&#39;, &#39;woocommerce&#39;); ?></label> </div> <div class="cart-footer-right"> <div class="selected-info"> <?php esc_html_e(&#39;Selected items:&#39;, &#39;woocommerce&#39;); ?> <span id="selected-count">0</span> <?php esc_html_e(&#39;Total:&#39;, &#39;woocommerce&#39;); ?> <span id="selected-total">RM0.00</span> </div> <button type="button" class="checkout-btn" id="partial-checkout"> <?php esc_html_e(&#39;Proceed to checkout&#39;, &#39;woocommerce&#39;); ?> </button> </div> </div> <?php do_action(&#39;woocommerce_before_cart_collaterals&#39;); ?> <div class="cart-collaterals"> <?php /** * Cart collaterals hook. * * @hooked woocommerce_cross_sell_display * @hooked woocommerce_cart_totals - 10 */ do_action(&#39;woocommerce_cart_collaterals&#39;); ?> </div> </div> <?php do_action(&#39;woocommerce_after_cart&#39;); ?> <script> jQuery(document).ready(function($) { // 全选功能 $(&#39;#select-all, #footer-select-all&#39;).change(function() { $(&#39;.item-checkbox&#39;).prop(&#39;checked&#39;, this.checked); updateSelectedInfo(); }); // 更新选中商品信息 function updateSelectedInfo() { let selectedCount = $(&#39;.item-checkbox:checked&#39;).length; let total = 0; $(&#39;.item-checkbox:checked&#39;).each(function() { let itemKey = $(this).val(); let subtotal = $(&#39;tr.cart_item&#39;).has(this).find(&#39;.product-subtotal .amount&#39;).html(); if (subtotal) { total += parseFloat(subtotal.replace(/[^\d.-]/g, &#39;&#39;)); } }); $(&#39;#selected-count&#39;).text(selectedCount); $(&#39;#selected-total&#39;).text(&#39;RM&#39; + total.toFixed(2)); } // 初始更新 updateSelectedInfo(); // 监听单个商品选择 $(&#39;.item-checkbox&#39;).change(updateSelectedInfo); // 删除选中商品 $(&#39;#remove-selected&#39;).click(function() { let selectedItems = []; $(&#39;.item-checkbox:checked&#39;).each(function() { selectedItems.push($(this).val()); }); if (selectedItems.length === 0) { alert(&#39;<?php esc_html_e("Please select items to remove", "woocommerce"); ?>&#39;); return; } if (confirm(&#39;<?php esc_html_e("Are you sure you want to remove the selected items?", "woocommerce"); ?>&#39;)) { $.each(selectedItems, function(index, itemKey) { $.ajax({ type: &#39;POST&#39;, url: wc_cart_params.ajax_url, data: { action: &#39;woocommerce_remove_cart_item&#39;, cart_item_key: itemKey, security: wc_cart_params.remove_item_nonce }, success: function(response) { $(document.body).trigger(&#39;wc_fragment_refresh&#39;); } }); }); } }); // 清空购物车 $(&#39;#clear-cart&#39;).click(function() { if (confirm(&#39;<?php esc_html_e("Are you sure you want to clear your cart?", "woocommerce"); ?>&#39;)) { $.ajax({ type: &#39;POST&#39;, url: wc_cart_params.ajax_url, data: { action: &#39;woocommerce_clear_cart&#39;, security: wc_cart_params.nonce }, success: function(response) { $(document.body).trigger(&#39;wc_fragment_refresh&#39;); } }); } }); // 替换原来的部分结算点击处理 $(&#39;#partial-checkout&#39;).click(function() { let selectedItems = $(&#39;.item-checkbox:checked&#39;).map(function() { return $(this).val(); }).get(); if (selectedItems.length === 0) { alert(&#39;<?php esc_html_e("Please select at least one item to checkout", "woocommerce"); ?>&#39;); return; } // 添加加载指示器 $(this).prop(&#39;disabled&#39;, true).html(&#39;<?php esc_html_e("Processing...", "woocommerce"); ?>&#39;); // 使用AJAX保存原始购物车状态 $.ajax({ type: &#39;POST&#39;, url: wc_cart_params.ajax_url, data: { action: &#39;wc_save_original_cart&#39;, security: wc_cart_params.nonce }, success: function() { // 创建临时表单提交 $(&#39;<form>&#39;, { &#39;method&#39;: &#39;post&#39;, &#39;action&#39;: &#39;<?php echo esc_url(wc_get_checkout_url()); ?>&#39; }).append($(&#39;<input>&#39;, { &#39;type&#39;: &#39;hidden&#39;, &#39;name&#39;: &#39;selected_cart_items&#39;, &#39;value&#39;: JSON.stringify(selectedItems) })).appendTo(&#39;body&#39;).submit(); }, error: function() { alert(&#39;<?php esc_html_e("An error occurred. Please try again.", "woocommerce"); ?>&#39;); $(&#39;#partial-checkout&#39;).prop(&#39;disabled&#39;, false).html(&#39;<?php esc_html_e("Proceed to checkout", "woocommerce"); ?>&#39;); } }); }); </script> This would be the code in my functions.php // 添加清空购物车功能 add_action(&#39;wp_ajax_woocommerce_clear_cart&#39;, &#39;woocommerce_clear_cart&#39;); add_action(&#39;wp_ajax_nopriv_woocommerce_clear_cart&#39;, &#39;woocommerce_clear_cart&#39;); function woocommerce_clear_cart() { if (!isset($_POST[&#39;security&#39;]) || !wp_verify_nonce($_POST[&#39;security&#39;], &#39;woocommerce-cart&#39;)) { wp_send_json_error(&#39;Invalid nonce&#39;); } WC()->cart->empty_cart(); wp_send_json_success(); } // 处理部分结算 - 改进版本 add_action(&#39;template_redirect&#39;, &#39;handle_partial_checkout&#39;); function handle_partial_checkout() { // 仅在进入结算页面时处理 if (is_checkout() && !is_wc_endpoint_url(&#39;order-received&#39;) && isset($_POST[&#39;selected_cart_items&#39;])) { $selected_items = json_decode(stripslashes($_POST[&#39;selected_cart_items&#39;]), true); if (!empty($selected_items) && is_array($selected_items)) { // 保存原始购物车到用户元数据(更持久) if (is_user_logged_in()) { $user_id = get_current_user_id(); update_user_meta($user_id, &#39;wc_original_cart&#39;, WC()->cart->get_cart_for_session()); } else { WC()->session->set(&#39;wc_original_cart&#39;, WC()->cart->get_cart_for_session()); } // 设置临时购物车标记 WC()->session->set(&#39;wc_partial_checkout&#39;, true); // 创建新购物车只包含选中商品 $new_cart = []; foreach ($selected_items as $item_key) { if (isset(WC()->cart->cart_contents[$item_key])) { $new_cart[$item_key] = WC()->cart->cart_contents[$item_key]; } } // 更新购物车 WC()->cart->cart_contents = $new_cart; WC()->cart->persistent_cart_update(); WC()->cart->calculate_totals(); } } } // 订单完成后恢复原始购物车 add_action(&#39;woocommerce_checkout_order_processed&#39;, &#39;restore_original_cart_after_order&#39;, 10, 3); function restore_original_cart_after_order($order_id, $posted_data, $order) { if (WC()->session->get(&#39;wc_partial_checkout&#39;)) { restore_original_cart($order_id); } } // 用户放弃结算时恢复购物车 add_action(&#39;template_redirect&#39;, &#39;maybe_restore_cart_on_cart_page&#39;); function maybe_restore_cart_on_cart_page() { if (is_cart() && WC()->session->get(&#39;wc_partial_checkout&#39;)) { restore_original_cart(); } } // 通用恢复函数 function restore_original_cart($order_id = null) { $original_cart = null; // 尝试从用户元数据获取 if (is_user_logged_in()) { $user_id = get_current_user_id(); $original_cart = get_user_meta($user_id, &#39;wc_original_cart&#39;, true); delete_user_meta($user_id, &#39;wc_original_cart&#39;); } // 尝试从会话获取 else { $original_cart = WC()->session->get(&#39;wc_original_cart&#39;); WC()->session->set(&#39;wc_original_cart&#39;, null); } if ($original_cart) { WC()->cart->cart_contents = $original_cart; WC()->session->set(&#39;wc_partial_checkout&#39;, false); WC()->cart->persistent_cart_update(); WC()->cart->calculate_totals(); } } // 保存原始购物车状态 add_action(&#39;wp_ajax_wc_save_original_cart&#39;, &#39;wc_save_original_cart&#39;); add_action(&#39;wp_ajax_nopriv_wc_save_original_cart&#39;, &#39;wc_save_original_cart&#39;); function wc_save_original_cart() { if (!isset($_POST[&#39;security&#39;]) || !wp_verify_nonce($_POST[&#39;security&#39;], &#39;woocommerce-cart&#39;)) { wp_send_json_error(&#39;Invalid nonce&#39;); } // 保存原始购物车 if (is_user_logged_in()) { $user_id = get_current_user_id(); update_user_meta($user_id, &#39;wc_original_cart&#39;, WC()->cart->get_cart_for_session()); } else { WC()->session->set(&#39;wc_original_cart&#39;, WC()->cart->get_cart_for_session()); } wp_send_json_success(); } correct?
最新发布
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值